Lecture 2 3 Number System
Lecture 2 3 Number System
Digital Design
CS/EEE /ECE/INSTR F215
8/25/2020
Number systems
General use Decimal numbers : 8956
a3a2a1a0 . a-1a-2
(110101)2 [Binary]
=1 x 25 + 1x 24 + 0 x 23 + 1 x 22 + 0 x 21 + 1 x 20 = ??
25-Aug-20 CS/EEE/ECE /INSTR F215 4
CKV
8/25/2020
CKV
8/25/2020
CKV
8/25/2020
Number systems
(B65F)16
(26.24)8 (16.5)16
(FAFA)16
Number conversions
Other conversions
1 6 1 2 5
(1110001010101)2 (16125)8
8/25/2020
CKV
Number conversions
Other conversions
6373
6 3 7 3
(6373)8 (110011111011)2
8/25/2020
CKV
Number conversions
Other conversions
Binary to Hexadecimal Hexa: base 16 digits used 0-F
1 C 5 5
(1110001010101)2 (1C55)16
8/25/2020
CKV
➢ Signed Magnitude
➢ Diminished radix complement
➢ Radix complement
8/25/2020
CKV
Complements
Diminished radix complement
Complements
0100 0100
1000 1100
1100 1 0000
1
0001
8/25/2020
CKV
Complements Add 4 & -3
8/25/2020
CKV
Complements
Radix complement
Given a number N in base r having n digits r’s complement is defined as
(rn-N)
In case of decimal it is called 10’s complement
Complements
Advantages of 2’s Complement
➢ Two Zeros
➢ No End-around-carry-bit addition
0100 0100
1001 1101
1101 1 0001
8/25/2020
CKV
Complements
8/25/2020
CKV
Complements
Advantages of 2’s Complement
➢ Easy Implementation: Adder Subtractor M=0 adder, M=1 Subtractor
8/25/2020
CKV
Complements
Overflow in 2’s Complement
8/25/2020
CKV
8/25/2020
BCD and Binary comparison
(185)10 BCD = (0001 1000 0101)
Binary = (10111001)2
8/25/2020
CKV
8/25/2020
CKV
4+8 4 0100
8 1000
1100 Is this expected Result ?
8/25/2020
CKV
8/25/2020
CKV
8/25/2020
CKV
8/25/2020
CKV
8/25/2020
CKV
Thankyou
8/25/2020