Chp2 NumberSystems
Chp2 NumberSystems
1. Introductory Concepts
2. Numbering Systems (conversion)
3. Boolean Algebra
4. Combinational Logic
5. Flip-Flops
6. Arithmetic Circuit
7. Counters & Shift Registers
8. MSI Devices
9. Logic Families
Binary
Decimal Octal
Range Hexadecimal
Calculation
(from chapter 1) BCD
Why conversion?
Need to represent real-world data (temperature,
speed, voltage) in a digital format.
Base 2
2 symbols :
Base 2
2 symbols : 0 1
e.g. : 1 0 1 1 . 1 12
Counting in Binary
Base 8
8 symbols :
Base 8
8 symbols : 01234567
e.g. : 1 4 2 3 . 4 18
Counting in Octal
66 67 68 70 71 72 73 74 75 76 77 78 80 100
Base 16
16 symbols :
Base 16
16 symbols :
Hexa Decimal
0123456789ABCDEF A 10
B 11
C 12
e.g. : A B 0 . C116 D 13
E 14
F 15
Counting in Hexadecimal
Counting in Hexadecimal
98 99 100 9A 9B 9C 9D 9E 9F 100 A0 A1
Convert 1 1 0 0. 0 1 2 to decimal.
Binary point
1 1 0 0 . 0 12
= 1x23 + 1x22 + 0x21 + 0x20 + 0x2-1 + 1x2-2
= 8 + 4 + 0 + 0 + 0 + 0.25
= 12.2510
8+0+2+1+0+0.25=11.25
Ans: 185.687510
Hexadecimal point
A 2 . 0 116
= 10x161 + 2x160 + 0x16-1 + 1x16-2
= 160 + 2 + 0 + 0.00390625
= 162.0039062510
Ans: 58839.6367187510
Stop at 0
Ans : 1110.0112
Stop at 0
Ans for whole number part:
6 18
49.312510 = 61.248
Ans : 174.628
Chp 2 Number Systems 32
2.2
Decimal to Hexadecimal
Convert 59. 351562510 to Hexa
Stop at 0
Ans for whole number part:
3 B16
59.351562510 = 3B.5A16
Ans: 7C.C816
Octal to binary
Convert 375.48 into its binary equivalent.
1752.7148
1752.7148
11010.12
Can add
leading 0
011 010 . 1002 Can add
trailing 0
in whole in
number
part
3 2 . 4 fractional
8 part
225.548
10 110 001 2
Ans : 69910
Tips
Can add
leading 0 101111011.012
Can add
in whole trailing 0
number 0001 0111 1011 .0100 2
in
part fractional
part
1 7 B . 4 16
Group every 4 bits (from the binary point) and
write the Hexa equivalent for each 4-bit code.
Ans: 1B5.7616
Counting in BCD
Try counting from 1000BCD to 0001 0011BCD
1000
1001
0001 0000 Must always be in
groups of 4 !!!
0001 0001
0001 0010
0001 0011
Decimal to BCD
Convert 61.810 into BCD
Cannot omit Cannot omit
leading 0 6 1 . 8 10 trailing 0
BCD to Decimal
Convert 1001 0111 0001 BCD to Decimal
9 7 . 1 10