2. Types of Number System
Number
System
Radix / Base
Decimal
2
Binary
10
Octal
8
Hexadecimal
16
Human Knowledge Recent
Processor / Controller
Old
Processors / Controllers
SpecifyingAddress
Created byVinoth Loganathan in interest ofVLSI Design
Guidance2
3. Decimal Number System
Base (also called radix) = 10
10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
Digit Position
Integer & fraction
DigitWeight
Weight = (Base) Position
Magnitude
Sum of “Digit x Weight”
Created byVinoth Loganathan in interest ofVLSI Design
Guidance3
4. Binary Number System
Base = 2
2 digits { 0, 1 }, called binary digits or “bits”
Weights
Weight = (Base)
Position
Magnitude
Sum of “Bit x Weight”
Groups of bits 4 bits = Nibble
8 bits = Byte
Created byVinoth Loganathan in interest ofVLSI Design
Guidance4
5. Octal Number System
Base = 8
8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
Weights
Weight = (Base)
Position
Magnitude
Sum of “Digit x Weight”
Created byVinoth Loganathan in interest ofVLSI Design
Guidance5
6. Hexadecimal Number System
Base = 16
16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,A, B, C, D, E, F }
Weights
Weight = (Base)
Position
Magnitude
Sum of “Digit x Weight”
Created byVinoth Loganathan in interest ofVLSI Design
Guidance6
9. Base conversion from binary
Conversion to octal / hex
Binary: 10011110001
Octal: 10 | 011 | 110 | 001 = 23618
Hex: 100 | 1111 | 0001 = 4F116
Conversion to decimal
1012 = 1×22
+ 0×21
+ 1×20
= 510
Created byVinoth Loganathan in interest ofVLSI Design
Guidance9
10. Formulation of Decimal number
system
10K-1 10k-2 ∙ ∙ 102 101 100
N = ± SK-1 SK-2 ∙ ∙ S2 S1 S0
N = ± SK-1 X 10K-1 + SK-1 X 10k-2 + ∙∙∙ + S2 X 102 + S1 X 101 + S0 X 100
10K-1 10k-2 ∙ ∙ 101 100 . 10-1 . . .
N = ± SK-1 SK-2 ∙ ∙ S1 S0 . S-1
. . .
N = ± SK-1 X 10K-1 + ∙∙∙ + S0 X 100 . S-1 X 10-1 + S-2 X 10-2 ∙∙∙
The Base(10) will be replaced for other number systemCreated byVinoth Loganathan in interest ofVLSI Design
Guidance10
11. Base conversion from Decimal
Created byVinoth Loganathan in interest ofVLSI Design
Guidance11
12. Base conversion from decimal to
Hexadecimal
222 13 0
16 3567 16 222 16 13
32 16 0
36 62 13
32 48
47 14
32
15
(3567)10 = (DEF)16Created byVinoth Loganathan in interest ofVLSI Design
Guidance12
15. How do we write negative binary
numbers
3 approaches:
• Sign and magnitude
• Ones-complement
• Twos-complement
All 3 approaches represent positive numbers in the same
way
Created byVinoth Loganathan in interest ofVLSI Design
Guidance15
16. Sign and magnitude
Most significant bit (MSB) is the sign bit
0 ≡ positive
1 ≡ negative
Remaining bits are the number's
magnitude
Two representations of for zero
+0 = 0000 and also –0 = 1000
0000
0001
0011
1111
1110
1100
1011
1010
1000 0111
0110
0100
0010
0101
1001
1101
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7– 0
– 1
– 2
– 3
– 4
– 5
– 6
– 7
Created byVinoth Loganathan in interest ofVLSI Design
Guidance16
17. Ones-complement
Negative number: Bitwise
complement of positive number
0111 ≡ 710
1000 ≡ –710
Disadvantage is it has two
representations for zero!
+0 = 0000 and also –0 = 1111
0000
0001
0011
1111
1110
1100
1011
1010
1000 0111
0110
0100
0010
0101
1001
1101
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7– 7
– 6
– 5
– 4
– 3
– 2
– 1
– 0
Created byVinoth Loganathan in interest ofVLSI Design
Guidance17