0% found this document useful (0 votes)
26 views18 pages

DLDZ

Uploaded by

rasoolaamir99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views18 pages

DLDZ

Uploaded by

rasoolaamir99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

NUMBER SYSTEMS

DIGITAL LOGIC DESIGN


OUTLINE

 Number Systems

 Base Conversion
 Decimal to Octal, Decimal to hexadecimal
 Octal to Decimal, hexadecimal to Decimal
 Binary to Octal, Binary to hexadecimal
 Octal to Binary, hexadecimal to Binary
 Octal to hexadecimal, hexadecimal to Octal

 MSB, LSB

 Complement
 1’s Complement
 2’s Complement
NUMBER SYSTEMS

 Decimal
 10 digits
 0,1,2,3,4,5,6,7,8

 Binary
 2 digits
 0,1

 Octal
 8 digits
 0,1,2,3,4,5,6,7

 Hexadecimal
 16 digits
 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
NUMBER SYSTEMS
 Decimal
 10 digits
 0,1,2,3,4,5,6,7,8
 Binary
 2 digits
 0,1
 Octal
 8 digits
 0,1,2,3,4,5,6,7
 Hexadecimal
 16 digits
 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Decimal Binary Octal Hexadecimal
0 0000 0 0

NUMBER SYSTEMS 1 0001 1 1


2 0010 2 2
 Decimal 3 0011 3 3
 10 digits 4 0100 4 4
 0,1,2,3,4,5,6,7,8
5 0101 5 5
 Binary 6 0110 6 6
 2 digits 7 0111 7 7
 0,1
8 1000 10 8
 Octal 9 1001 11 9
 8 digits 10 1010 12 A
 0,1,2,3,4,5,6,7
11 1011 13 B
 Hexadecimal
12 1100 14 C
 16 digits
13 1101 15 D
 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
14 1110 16 E
15 1111 17 F
DECIMAL TO BINARY

 Using Successive Divisions

 Example: Convert (55)10 to(?)2


 2 | 55
 2 | 27 ------ > 1
 2 | 13 ------ > 1
 2|6 ------ > 1
 2|3 ------ > 0
 2|1 ------ > 1

 Answer = (110111)2
DECIMAL TO OCTAL

 Using Successive Divisions

 Example: Convert (378.93)10 to(?)8


 8 | 378
 8 | 47 ------ > 2
 8|5 ------ > 7
 8|0 ------ > 5

 Answer = (572)8
DECIMAL TO HEXADECIMAL

 Using Successive Divisions

 Example: Convert (378.93)10 to(?)16


 16 | 2598
 16 | 162 ------ > 6
 16 | 10 ------ > 2

 Answer = (A26)16
DECIMAL TO BINARY, OCTAL, HEXADECIMAL (OTHER SYSTEMS)

 Using Successive Divisions, by other system’s base

Example: Convert (55)10 to(?)2 Example: Convert (378.93)10 to(?)8 Example: Convert (378.93)10 to(?)16

2 | 55 8 | 378 16 | 2598
2 | 27 ------ > 1 8 | 47 ------ > 2 16 | 162 ------ > 6
2 | 13 ------ > 1 8 | 5 ------ > 7 16 | 10 ------ > 2
2|6 ------ > 1 8 | 0 ------ > 5
2|3 ------ > 0 Answer = (A26)16
2|1 ------ > 1 Answer = (572)8

Answer = (110111)2
BINARY TO DECIMAL

 Example: Convert (110111.01)2 to(?)10


 1x2^5 + 1x2^4 + 0x2^3 + 1x2^2 + 1x2^1 + 1x2^0 + 0x2^-1 + 1x2^-2
 1x32 + 1x16 + 0 + 1x4 + 1x2 + 1 + 0 + 1x0.5
 32 + 16 + 4 + 2 + 1 + 0.5
 55.5

 Answer = (55.5)10
OCTAL TO DECIMAL

 Example: Convert (4057.06)8 to(?)10


 4x8^3 + 0x8^2 + 5x8^1 + 7x8^0+0x8^-1 + 6x8^-2
 2048 + 0 + 40 + 7 + 0 + 0.937

 Answer = (2095.0937)8
HEXADECIMAL TO DECIMAL

 Example: Convert (5C7)16 to(?)10


 5x16^2 + Cx16^1 + 7x16^0
 1280 + 192 + 7

 Answer = (147)10
BINARY TO OCTAL
 Partition digits into group of 3

 Example: Convert (01010101)2 to (? )8


 001 010 101
 1 2 5

 Answer : (125)8
BINARY TO HEXADECIMAL
 Partition digits into group of 4

 Example: Convert (01010101)2 to (? )16


 0101 0101
 5 5

 Answer : (55)16
OCTAL TO BINARY
 Substitute Binary for each digit

 Example: Convert (555)8 to (? )2


 5 5 5
 101 101 101

 Answer : (101101101)2
OCTAL TO HEXADECIMAL & HEXADECIMAL TO OCTAL

 Method 1: Convert Octal to Decimal and then Decimal to hexadecimal

Octal Decimal Hexadecimal

 Method 2: Convert Octal to binary and then binary to hexadecimal

Hexa
Octal Binary
decimal
OCTAL TO HEXADECIMAL

 Convert Octal to binary and then binary to hexadecimal


 Simplest way

 Example: (756.603)8

Octal 7 5 6 . 6 0 3

Binary 111 101 110 . 110 000 011


hexadecimal-
0001 1110 1110 . 1100 0001 1000
Binary
hexadecimal 1 E E . C 1 8
HEXADECIMAL TO OCTAL
 Convert hexadecimal to binary and then binary to Octal
 Simplest way

 Example: (B9F.AE)16

hexadecimal B 9 F . A E
Binary 1011 1001 1111 . 1010 1110
Octal-Binary 101 110 011 111 . 101 011 100
Octal 5 6 3 7 . 5 3 4

You might also like