Docsity

Number Systems and Binary Arithmetic in ECE 301 - Digital System Design - Prof. Craig A. L, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Number Systems and Binary Arithmetic in ECE 301 - Digital System Design - Prof. Craig A. L and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ECE 301 – Digital System Design

Number Systems and Binary Arithmetic

(Lecture #2)

Learning Objectives

• Number Systems

– Binary, octal, and hexadecimal

• Conversion between number systems

• Binary arithmetic

– Addition, subtraction, and multiplication

• Representation of negative numbers

Number Systems

Number Systems

What is the value of the following number:

Number Systems

Which number system(s) are important to the

digital circuit designer?

Number Systems

The number systems that are important to the

digital system designer are:

Binary (base 2) [0,1]

Octal (base 8) [0 … 7]

Hexadecimal (base 16) [0 … 9, A … F]

Other number systems

You must, however, be familiar with other number

systems.

Number Systems: Examples

Determine the decimal equivalent value of:

2

(binary)

A36.E 16 (hexadecimal)

= 1 x 2

3

+ 1 x 2

2

+ 1 x 2

0

+ 1 x 2

= 10 x 16

2

+ 3 x 16

1

+ 6 x 16

0

+ 14 x 16

Number Systems: Exercises

Determine the decimal equivalent value for

each of the following numbers:

2 (binary)

8

(octal)

– B4C.

16 (hexadecimal)

3

(base 3)

Number Conversion: Example

Convert 37

to Binary.

37 / 2 = 18 Rem = 1 18 / 2 = 9 Rem = 0 9 / 2 = 4 Rem = 1 4 / 2 = 2 Rem = 0 2 / 2 = 1 Rem = 0 1 / 2 = 0 Rem = 1

LSB

MSB

Number Conversion: Example

Convert 183

to Octal.

183 / 8= 22 Rem = 7 22 / 8 = 2 Rem = 6 2 / 8 = 0 Rem = 2

LSD

MSD

Number Conversion: Exercise

Convert 74

to octal.

Number Conversion: Example

Convert 0.

to Binary.

0.625 * 2 = 1.250 a-1 = 1 0.250 * 2 = 0.500 a-2 = 0 0.500 * 2 = 1. 000 a-3 = 1

MSB

LSB

Number Conversion: Example

Convert 0.

to Binary.

0.70 * 2 = 1.40 a-1 = 1 0.40 * 2 = 0.80 a-2 = 0 0.80 * 2 = 1.60 a-3 = 1 0.60 * 2 = 1.20 a-4 = 1 0.20 * 2 = 0.40 a-5 = 0 0.40 * 2 = 0.80 a-6 = 0 0.80 * 2 = 1.60 a-7 = 1

begins repeating

Number Conversion: Exercise

Convert 0.

to binary.