Digital Logic
Number System
Number Systems • Digital computer manipulates discrete elements represented in binary forms.
• Every number system has a base or radix r, which gives the number of digits in a particular number system (0 to r-1). • 4 number systems that we generally deal with radix/base – Decimal
- 10
– Binary
-
2
– Octal
-
8
– Hexadecimal - 16
Number Systems • Binary Number System – Base – 2 – 2 digits – 0 & 1 – Ex: 01001(2), 10101(2)
• Octal Number System – Base – 8 – 8 digits – 0, 1, 2, 3, 4, 5, 6, 7 – Ex: 567(8), 135(8)
• Hexadecimal Number System – Base – 16 – 16 digits – 0 to 9, A to F (10 to 15) – Ex: B4916, FFFF(16)
• In general, a number in any base r system is expressed as an.rn + an-1.rn-1 + … + a2.r2 + a1.r + a0 + a-1.r-1 + a-2.r-2 + … + a-m.r-m This expression can also be used to convert any base-r system to decimal system The Co-efficient values for base r can be only the values less than r. Ex1: 1010(2) = 1 x 23 + 0 x 2
2
=8+0+2+0 = 10 Ex2: A29(16) = A x 162 + 2 x 16 + 9 = 2560 + 32 + 9 = 2601
+ 1 x 2 + 0 x 20