Download presentation
Presentation is loading. Please wait.
Published byTimothy Jefferson Modified over 8 years ago
1
Digital Logic & Design Adil Waheed Lecture 03
2
Range of Binary Numbers Processors can handle 64-bit unsigned binary values. Maximum unsigned decimal number is 18.446 x 10 18 How to represent larger numbers? How to represent very small numbers? How to represent numbers with integer part and fraction part?
3
Hexadecimal Number System Base 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Representing Binary in compact form 1101100000110 2 = 1B06 H
4
Counting in Hexadecimal DecimalBinaryHexadecimalDecimalBinaryHexadecimal 000000810008 100011910019 200102101010A 300113111011B 401004121100C 501015131101D 601106141110E 701117151111F
5
Binary-Hexadecimal Conversion Binary to Hexadecimal Conversion 11010110101110010110 D 6 B 9 6 Hexadecimal to Binary Conversion FD13 1111 1101 0001 0011
6
Decimal-Hexadecimal Conversion Decimal to Hexadecimal Conversion Indirect Method Decimal →Binary → Hexadecimal Repeated Division by 16
7
Decimal-Hexadecimal Conversion Hexadecimal to Decimal Conversion Indirect Method Hexadecimal →Binary → Decimal Sum-of-Weights
8
Hexadecimal Addition & Subtraction Hexadecimal Addition Carry generated Hexadecimal Subtraction Borrow weight 16
9
Repeated Division by 16 NumberQuotientRemainder 20961310 83 808
10
Sum-of-Weights CA02 (C x 16 3 ) + (A x 16 2 ) + (0 x 16 1 ) + (2 x 16 0 ) (12 x 16 3 ) + (10 x 16 2 ) + (0 x 16 1 ) + (2 x 16 0 ) (12 x 4096) + (10 x 256) + (0 x 16) + (2 x 1) 49152 + 2560 + 0 + 2 51714
11
Hexadecimal Addition Carry 1 2AC66+5=11d Bh + 92B5C+B=23d 17h BD7BA+2+1=13d Dh 2+9=11d Bh
12
Hexadecimal Subtraction Borrow 111 92B521-6=15d Fh - 2AC626-C=14d Eh 67EF17-A=7d 7h 8-2=6d 6h
13
Octal Number System Base 8 0, 1, 2, 3, 4, 5, 6, 7 Representing Binary in compact form 1101100000110 2 = 15406 8
14
Counting in Octal DecimalBinaryOctal 00000 10011 20102 30113 41004 51015 61106 71117
15
Counting in Octal DecimalOctalDecimalOctalDecimalOctal 81016202430 91117212531 101218222632 111319232733 121420242834 131521252935 141622263036 151723273137
16
Binary-Octal Conversion Binary to Octal Conversion 11010110101110010110 011 010 110 101 110 010 110 3 2 6 5 6 2 6 Octal to Binary Conversion 1726 001 111 010 110
17
Decimal-Octal Conversion Decimal to Octal Conversion Indirect Method Decimal →Binary → Octal Repeated Division by 8
18
Decimal-Octal Conversion Octal to Decimal Conversion Indirect Method Octal →Binary → Decimal Sum-of-Weights
19
Octal Addition & Subtraction Octal Addition Carry generated Octal Subtraction Borrow weight 8
20
Repeated Division by 8 NumberQuotientRemainder 20752593 (O 0 ) 259323 (O 1 ) 840 (O 2 ) 404 (O 3 )
21
Sum-of-Weights 4033 (4 x 8 3 ) + (0 x 8 2 ) + (3 x 8 1 ) + (3 x 8 0 ) (4 x 512) + (0 x 64) + (3 x 8) + (3 x 1) 2048 + 0 + 24 + 3 2075
22
Octal Addition Carry1 76022+1=3d 3O + 57710+7=7d 7O 155736+7=13d 15O 1+7+5=13d 15O
23
Octal Subtraction Borrow 11 76022-1=1d 1O - 57718-7=1d 1O 161113-7=6d 6O 6-5=1d 1O
24
Alternate Representations BCD Code BCD Addition Gray Code
25
Alternate Representations BCD (Binary Coded Decimal) Code DecimalBCDDecimalBCD 0000050101 1000160110 2001070111 3001181000 4010091001
26
BCD Addition Multi-digit BCD numbers can be added together 230010 0011 450100 0101 680110 1000 230010 0011 480100 1000 710110 1011 1011 is illegal BCD number
27
BCD Addition Add a 0110 (6) to an invalid BCD number Carry added to the most significant BCD digit 230010 0011 480100 1000 710110 1011 0110 0111 0001
28
Alphanumeric Code Numbers, Characters, Symbols ASCII 7-bit Code American Standard Code for Information Interchange 10 Numbers (0-9) 26 Lower Case Characters (a-z) 26 Upper Case Characters (A-Z) Punctuation and Symbols
29
ASCII Code Numbers 0 to 9 ASCII 0110000 (30h) to 0111001 (39h) Alphabets a to z ASCII 1100001 (61h) to 1111010 (7Ah) Alphabets A to Z ASCII 1000001 (41h) to 1011010 (5Ah) Control Characters ASCII 0000000 (0h) to 0011111 (1Fh)
30
Error Detection Digital Systems are very Reliable Errors during storage or transmission Parity Bit Even Parity Odd Parity
31
parity Odd parity: The number of 1-bit must add up to an odd number Even parity: The number of 1-bit must add up to an even number
32
Summary Hexadecimal Number System Binary-Hexadecimal Conversion Decimal-Hexadecimal Conversion Octal Number System Binary-Octal Conversion Decimal-Octal Conversion
33
Summary Alternate Representations BCD Code Gray Code Alphanumeric Codes ASCII Error Detection Parity Bit
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.