chapter 1 (part a) digital systems and binary numbers

50
Chapter 1 (Part a) Digital Systems and Binary Numbers Digital Logic Design Originally by T.Tasniem Nasser Al- Yahya

Upload: paniz

Post on 23-Feb-2016

153 views

Category:

Documents


12 download

DESCRIPTION

Digital Logic Design. Chapter 1 (Part a) Digital Systems and Binary Numbers . Originally by T.Tasniem Nasser Al-Yahya. Outline of Chapter 1 (Part a). 1.1 Digital Systems 1.2 Binary Numbers 1.3 Number-base Conversions 1.4 Octal and Hexadecimal Numbers. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Chapter 1 (Part a) Digital Systems and Binary Numbers

Digital Logic Design

Originally by TTasniem Nasser Al-Yahya

Outline of Chapter 1 (Part a)

11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1 (Part a)

11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Digital Systems Digital systems (systems that can manipulate Discrete information)

Digital Computers Digital camera Electronic calculators Digital TV

Analog and Digital Signal In digital system discrete element of information are represented

by quantities called signals Analog Signal

The physical quantities may vary continuously over a specified range(infinite possible values)

Ex voltage on a wire created by microphone Digital Signal

a digital signal has discrete values over a specified range Ex button pressed on a keyboard

X (t)

t

Analog signal

Digital signal

The signals in most digital systems use just two discrete values and therefore said to be binary

A binary digit called a bit has two values 0 and 1

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 2: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Outline of Chapter 1 (Part a)

11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1 (Part a)

11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Digital Systems Digital systems (systems that can manipulate Discrete information)

Digital Computers Digital camera Electronic calculators Digital TV

Analog and Digital Signal In digital system discrete element of information are represented

by quantities called signals Analog Signal

The physical quantities may vary continuously over a specified range(infinite possible values)

Ex voltage on a wire created by microphone Digital Signal

a digital signal has discrete values over a specified range Ex button pressed on a keyboard

X (t)

t

Analog signal

Digital signal

The signals in most digital systems use just two discrete values and therefore said to be binary

A binary digit called a bit has two values 0 and 1

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 3: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Outline of Chapter 1 (Part a)

11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Digital Systems Digital systems (systems that can manipulate Discrete information)

Digital Computers Digital camera Electronic calculators Digital TV

Analog and Digital Signal In digital system discrete element of information are represented

by quantities called signals Analog Signal

The physical quantities may vary continuously over a specified range(infinite possible values)

Ex voltage on a wire created by microphone Digital Signal

a digital signal has discrete values over a specified range Ex button pressed on a keyboard

X (t)

t

Analog signal

Digital signal

The signals in most digital systems use just two discrete values and therefore said to be binary

A binary digit called a bit has two values 0 and 1

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 4: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Digital Systems Digital systems (systems that can manipulate Discrete information)

Digital Computers Digital camera Electronic calculators Digital TV

Analog and Digital Signal In digital system discrete element of information are represented

by quantities called signals Analog Signal

The physical quantities may vary continuously over a specified range(infinite possible values)

Ex voltage on a wire created by microphone Digital Signal

a digital signal has discrete values over a specified range Ex button pressed on a keyboard

X (t)

t

Analog signal

Digital signal

The signals in most digital systems use just two discrete values and therefore said to be binary

A binary digit called a bit has two values 0 and 1

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 5: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Analog and Digital Signal In digital system discrete element of information are represented

by quantities called signals Analog Signal

The physical quantities may vary continuously over a specified range(infinite possible values)

Ex voltage on a wire created by microphone Digital Signal

a digital signal has discrete values over a specified range Ex button pressed on a keyboard

X (t)

t

Analog signal

Digital signal

The signals in most digital systems use just two discrete values and therefore said to be binary

A binary digit called a bit has two values 0 and 1

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 6: Chapter 1  (Part a)  Digital Systems and Binary Numbers

The signals in most digital systems use just two discrete values and therefore said to be binary

A binary digit called a bit has two values 0 and 1

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 7: Chapter 1  (Part a)  Digital Systems and Binary Numbers

t

V(t)

Binary digital signal

Logic 1

Logic 0

undefined

The two discrete values are physically represented by ranges of voltage values called HIGH and LOW

On yes true 1 (voltage between 40 and 50) Off no false 0 (voltage between 00 and 10)

Discrete elements of information are represented with groups of bits called binary codes Ex 7 0111 ( Off On On On)

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 8: Chapter 1  (Part a)  Digital Systems and Binary Numbers

A digital system is an interconnection of digital modules To understand the operation of each digital module it is

necessary to have a basic knowledge of digital circuits and their logical functions

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 9: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 10: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 11: Chapter 1  (Part a)  Digital Systems and Binary Numbers

General positional Number System Base (also called radix) = r

r is an integer and ge 2 r digits 0 hellip r-1 (546)4 is not correct

Coefficient Weight Weight = (Base) Position=i

Magnitude(The value of a digit depends not only on its value but also on its

position within the number The magnitude M of a number ( ) in base

r is

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 12: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary Number System Base = 2

2 digits 0 1 called binary digits or ldquobitsrdquo

Weights Weight = (Base) Position

Magnitude Sum of ldquoBit x Weightrdquo

Formal Notation Groups of bits

4 bits = Nibble

8 bits = Byte

1 0 -12 -2

2 1 124 14

1 0 1 0 1

1 22+0 21+1 20+0 2-1+1 2-2

=(525)10

(10101)21 0 1 1

1 1 0 0 0 1 0 1

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 13: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary Arithmetic Operations The next section will discuss Unsigned arithmetic operations in

Binary base system

Addition Subtraction Multiplication

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 14: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Addition The sum of two binary numbers is calculated by the same rules as

in decimal except that the digits of the sum in any significant position can be only zero or one

Line up the numbers from right to left If one number is shorter extend it by adding leading zeros to the number

(the extension is different with signed number) Work from right to left ndash add each pair of digits together with

carry propagation 0+0=00+1=11+0=11+1=01 ( carry )1+1+1=11 (carry)

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 15: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal Addition (345)10+(89)10

4 598+

434

= 14 ge base 10 14-10 add carry

11 Carry 3

= 13 ge base 10 13-10 add carry

0

= 4 lt base 10

augend

addend

sum

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 16: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Example 2 Binary Addition (111101)2+(10111)2

1 0 11111111 0+

0000 1 11

111111= (61)10

= (23)10

= (84)10

0

= 2 ge base 2 2-2 add carry

Carry

Consider carry

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 17: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary Addition Practice Calculate (101101)2+(100111)2

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 18: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Subtraction Line up the numbers from right to left If one number is shorter

extend it by adding leading zeros to the number Work from right to left ndashSubtract each pair of digits together

with borrowing where needed0-0=00-1=1 (after borrowing)1-0=11-1=0

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 19: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Example 1 Decimal subtraction (345)10-(89)10

4 598-

652

= 5lt9 borrow from 4Decrease 4 to 35+10 = 1515-9 = 6

3

= 3lt8 borrow from 3Decrease 3 to 23+10=1313-8 = 5

0

= 2gt0 2-0=2

times32

timesminuend

subtrahend

difference

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 20: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Example 2 Binary subtraction (111101)2-(10111)2

1 0 11111111 0-

0101 0 1

= (61)10

= (23)10

= (38)10

0

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 21: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary Subtraction Practice Calculate (101101)2-(100111)2

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 22: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary Subtraction In many cases binary subtraction is done in a

special way by binary addition Why It is much more simple to do it that way 1048708One

simple building block called adder can be implemented and used for both binary addition and subtraction

This subject will be discussed later

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 23: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Multiplication Multiplication is Simple The multiplier digits are always 1 or 0therefore the partial

products are equal either to the multiplicand or to 0

00=001=010=011=1

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 24: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Example 1 (10111)2times(1010)2

01 1 1 101 1 0

00 0 0 001 1 1 1

01 1 1 10 0 000

0110111 0

x

+

= (23)10

= (10)10

= (230)10

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 25: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary Multiplication Practice Calculate (1011)2 (101)2

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 26: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Recall Decimal Number System Base (also called radix) = 10

10 digits 0 1 2 3 4 5 6 7 8 9 Coefficient Position

Integer amp fraction Coefficient Weight

Weight = (Base) Position

In general Magnitude Sum of ldquoCoefficient x Weightrdquo

1 0 -12 -2

5 1 2 7 4

10 1 01100 001

500 10 2 07 004

a2r2+a1r

1+a0r0+a-1r

-1+a-2r-2

(51274)10

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 27: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Octal Number System Base = 8

8 digits 0 1 2 3 4 5 6 7 Weights

Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

(Note that the digits 8 and 9 cannot appear in an octal number)

1 0 -12 -2

8 1 1864 164

5 1 2 7 4

5 82+1 81+2 80+7 8-1+4 8-2

=(3309375)10

(51274)8

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 28: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Hexadecimal Number System Base = 16

16 digits 0 1 2 3 4 5 6 7 8 9 A B C D E F Where A=10 B=11 C=12 D=13 E= 14 F=15

Weights Weight = (Base) Position

Magnitude Sum of ldquoDigit x Weightrdquo

1 0 -12 -2

16 1 116256 1256

1 E 5 7 A

1 162+14 161+5 160+7 16-1+10 16-2

=(4854765625)10

(1E57A)16

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 29: Chapter 1  (Part a)  Digital Systems and Binary Numbers

The Power of 2n 2n

0 20=1

1 21=2

2 22=4

3 23=8

4 24=16

5 25=32

6 26=64

7 27=128

n 2n

8 28=256

9 29=512

10 210=1024

11 211=2048

12 212=4096

20 220=1M

30 230=1G

40 240=1T

Mega

Giga

Tera

Kilo

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 30: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Outline of Chapter 1 11 Digital Systems 12 Binary Numbers 13 Number-base Conversions 14 Octal and Hexadecimal Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 31: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 32: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Octal and Hexadecimal Numbers

The conversion from and to binary octal and hexadecimal plays an important role in digital computers

Digital computers use binary numbers However they are difficult to work with as they are long

By using octal or hexadecimal conversion the human operator thinks in terms of octal and hex numbers and performs the required conversion when direct information with the machine is necessary

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 33: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary minus Octal Conversion 8 = 23

Each octal digit corresponds to three binary digits

Octal Binary

0 0 0 0

1 0 0 1

2 0 1 0

3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 2 6 2 )8

Assume Zeros

Works both ways (Binary to Octal amp Octal to Binary)Start from the point and proceed to the left and to the right

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 34: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary minus Octal Conversion Practice Convert (1010111111 ) 2 to Octal

( 1 0 1 0 1 1 1 1 1 1 )2

( )8

Start from the point and proceed to the left and to the right

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 35: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary minus Hexadecimal Conversion 16 = 24

Each hexadecimal digit corresponds to four binary digits

Hex Binary0 0 0 0 01 0 0 0 12 0 0 1 03 0 0 1 14 0 1 0 05 0 1 0 16 0 1 1 07 0 1 1 18 1 0 0 09 1 0 0 1A 1 0 1 0B 1 0 1 1C 1 1 0 0D 1 1 0 1E 1 1 1 0F 1 1 1 1

Example

( 1 0 1 1 0 0 1 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Binary to Hex amp Hex to Binary)

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 36: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Binary minus Hexadecimal Conversion Practice Convert (11010111111001 ) 2 to Hexadecimal

( 1 1 0 1 0 1 1 1 1 1 1 0 0 1 )2

( )16

Start from the point and proceed to the left and to the right

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 37: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Octal minus Hexadecimal Conversion Convert to Binary as an intermediate step

Example

( 0 1 0 1 1 0 0 1 0 )2

( 1 6 4 )16

Assume Zeros

Works both ways (Octal to Hex amp Hex to Octal)

( 2 6 2 )8

Assume Zeros

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 38: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal Binary Octal Hex00 0000 00 001 0001 01 102 0010 02 203 0011 03 304 0100 04 405 0101 05 506 0110 06 607 0111 07 708 1000 10 809 1001 11 910 1010 12 A11 1011 13 B12 1100 14 C13 1101 15 D14 1110 16 E15 1111 17 F

Decimal Binary Octal and Hexadecimal

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 39: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Outline of Chapter 1

14 Octal and Hexadecimal Numbers 13 Number-base Conversions

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 40: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Number Base Conversions

Decimal(Base 10)

Octal(Base 8)

Binary(Base 2)

Hexadecimal(Base 16)

Evaluate Magnitude

Evaluate Magnitude

Evaluate Magnitude

Any system(Base r)

Evaluate Magnitude

Divide by 8

Divide by 2

Divide by 16

Divide by r

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 41: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Conversion form any base to Decimal

(Evaluate magnitude)

Decimal(Base 10)

Any system(Base r)

Evaluate Magnitude

We can use the evaluate magnitude method to convert any base number to decimal (see slide 9)

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 42: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Conversion form any base to Decimal

(Evaluate magnitude) Example convert 110101 in binary to decimal

The decimal value is

1 1 0 1 0 1 Binary digits or bits23 22 21 20 2-1 2-2 Weights (in base 10)

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 43: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Conversion form Decimal to any base system (Divide by base)

Decimal(Base 10)

Any system(Base r)

Divide by r

To convert a decimal integer into any base keep dividing by r until the quotient is 0 Collect the remainders in reverse order

To convert a fraction keep multiplying the fractional part by r until it becomes 0 or until we reach the required accuracy Collect the integer parts in forward order

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 44: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Divide the number by the lsquoBasersquo (=2) Take the remainder (either 0 or 1) as a coefficient Take the quotient and repeat the division until the quotient

reaches zero

Example (13)10

Quotient Remainder Coefficient

Answer (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB

13 2 = 6 1 a0 = 1 6 2 = 3 0 a1 = 0 3 2 = 1 1 a2 = 1 1 2 = 0 1 a3 = 1

Decimal (Integer) to Binary Conversion

LSB

MSB

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 45: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Multiply the number by the lsquoBasersquo (=2) Take the integer (either 0 or 1) as a coefficient Take the resultant fraction and repeat the division till you reach a

zero or the required accuracy is attained

Example (0625)10

Integer Fraction Coefficient

Answer (0625)10 = (0a-1 a-2 a-3)2 = (0101)2

MSB LSB

0625 2 = 1 25025 2 = 0 5 a-2 = 005 2 = 1 0 a-3 = 1

a-1 = 1

Decimal (Fraction) to Binary Conversion

MSB

LSB

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 46: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal to Binary Conversion Practice Convert (416875 ) 10 to binary number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 47: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal to Octal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a2 a1 a0)8 = (257)8

175 8 = 21 7 a0 = 7 21 8 = 2 5 a1 = 5 2 8 = 0 2 a2 = 2

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1 a-2 a-3)8 = (024)8

03125 8 = 2 505 8 = 4 0 a-2 = 4

a-1 = 2

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 48: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal to Octal Conversion Practice Convert (153513 ) 10 to Octal number

it is necessary to separate the number into an integer part and a fraction part since each part must be converted differently

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 49: Chapter 1  (Part a)  Digital Systems and Binary Numbers

Decimal to Hexadecimal ConversionExample (175)10

Quotient Remainder Coefficient

Answer (175)10 = (a1 a0)16 = (AF)16

175 16 = 10 15 a0 = F 10 16 = 0 10 a1 = A

Example (03125)10

Integer Fraction Coefficient

Answer (03125)10 = (0a-1)16 = (02)16

03125 16 = 5 0 a-1 = 2

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50
Page 50: Chapter 1  (Part a)  Digital Systems and Binary Numbers

The following sections from chapter 1 have been given on the lecture but without power point slides

15 16 17

  • Chapter 1 (Part a) Digital Systems and Binary Numbers
  • Outline of Chapter 1 (Part a)
  • Outline of Chapter 1 (Part a) (2)
  • Digital Systems
  • Analog and Digital Signal
  • Slide 6
  • Slide 7
  • Slide 8
  • Outline of Chapter 1
  • Decimal Number System
  • General positional Number System
  • Binary Number System
  • Binary Arithmetic Operations
  • Addition
  • Slide 15
  • Example 2
  • Binary Addition
  • Subtraction
  • Example 1
  • Example 2 (2)
  • Binary Subtraction
  • Binary Subtraction (2)
  • Multiplication
  • Example 1 (2)
  • Binary Multiplication
  • Recall Decimal Number System
  • Octal Number System
  • Hexadecimal Number System
  • The Power of 2
  • Outline of Chapter 1 (2)
  • Outline of Chapter 1 (3)
  • Octal and Hexadecimal Numbers
  • Binary minus Octal Conversion
  • Binary minus Octal Conversion (2)
  • Binary minus Hexadecimal Conversion
  • Binary minus Hexadecimal Conversion (2)
  • Octal minus Hexadecimal Conversion
  • Decimal Binary Octal and Hexadecimal
  • Outline of Chapter 1 (4)
  • Number Base Conversions
  • Conversion form any base to Decimal (Evaluate magnitude)
  • Conversion form any base to Decimal (Evaluate magnitude) (2)
  • Conversion form Decimal to any base system (Divide by base)
  • Decimal (Integer) to Binary Conversion
  • Decimal (Fraction) to Binary Conversion
  • Decimal to Binary Conversion
  • Decimal to Octal Conversion
  • Decimal to Octal Conversion (2)
  • Decimal to Hexadecimal Conversion
  • Slide 50