Chapter 2 Number Systems
Introduction A number system is a set of symbols used to express quantities as the basis for counting, determining order, comparing amounts, performing calculations.
The Decimal Number System The decimal number system is used in our everyday life. It has values from 0 – 9. Decimal number system has a base of 10. This means that each digit in the number is multiplied by 10 raised to a power corresponding to that digit’s position.
Decimal Number System (con’t.) (47)10 7 x 100 = 7X1 4 x 101 = 4X10
Decimal Number System (con’t.) (4928)10 8 x 100 = 8x1 2 x 101 = 1x10 9 x 102 = 9x100 4 x 103 = 4x100
The Binary Number System Binary is a number system used by digital devices like computers. In the binary system, there are only two digits, 0 and 1. The binary system is said to have a base of 2.
Binary Number System (con’t.) (1001)2 1 x 20 = 1x1 0 x 21 = 0x2 0 x 22 = 0x4 1 x 23 = 1x8
The Hexadecimal Number System Hexadecimal number system is a numeral system with a base of 16. The values are represented by 0-9, A,B,C,D,E,F. Each hexadecimal digit represents four (4) binary bits.
The Octal Number System Octal number system is a numeral system with a base of 8. The values are represented by 0-7. Each octal digit represents three (3) binary bits.
Conversions between Binary and Decimal Number System (10011)2 1 x 20 = 1x1 1 x 21 = 1x2 0 x 22 = 0x4 0 x 23 = 0x8 1 x 24 = 1x16 (19)10
Conversions between Binary and Decimal Number System (101001)2 1 x 20 = 1x1 0 x 21 = 0x2 0 x 22 = 0x4 1 x 23 = 1x8 0 x 24 = 0x16 1 x 25 = 1x32 (41)10
Conversions between Binary and Decimal Number System (con’t.) (101.011)2 1 x 2-3 = 1x1/8 = 1x0.125 1 x 2-2 = 0x1/4 = 1x0.250 0 x 2-1 = 0x1/2 = 0x0.500 1 x 20 = 1x1 = 1 0 x 21 = 0x2 = 0 1 x 22 = 1x4 = 4 (5.375)10
Conversions between Binary and Decimal Number System (con’t.) (1100.1011)2 1 x 2-4 = 1x1/8 = 1x0.0625 1 x 2-3 = 1x1/8 = 1x0.125 0 x 2-2 = 0x1/4 = 0x0.250 1 x 2-1 = 0x1/2 = 1x0.500 0 x 20 = 0x1 = 0 0 x 21 = 0x2 = 0 1 x 22 = 1x4 = 4 1 x 23 = 1x8 = 8 (12.6875)10
Conversions from Decimal to Binary Number Systems To convert a decimal number to its binary equivalent, we should repeatedly divide the decimal number by 2.
Conversions from Decimal to Binary Number Systems (con’t.) (18)10 = (10010)2 Use 2 N R A 2 18 0 (LSD) 2 9 1 2 4 0 2 2 0 1 (MSD)
Conversions from Decimal to Binary Number Systems (con’t.) (43)10 = (101011)2 2 43 1 (LSD) 2 21 1 2 10 0 2 5 1 2 2 0 1 (MSD)
Conversions from Decimal to Binary Number Systems (con’t.) To convert the decimal fraction to a binary number, repeatedly multiply the decimal fraction by 2.
Conversions from Decimal to Binary Number Systems (con’t.) (0.375)10 0.375 * 2 = 0.75 (MSD) .75 * 2 = 1.5 .50 * 2 = 1.0 (LSD) (0.011)2
Conversions from Decimal to Binary Number Systems (con’t.) (0.432)10 0.432 * 2 = 0.864 (MSD) .864 * 2 = 1.728 .728 * 2 = 1.456 .456 * 2 = 0.912 .912 * 2 = 1.824 (LSD) (0.01101)2
Binary Addition To add binary digits, the following rules should be used: Rule 4 Rule 3 Rule 2 Rule 1 1 +1 +0 10
Binary Addition (011)2 + (110)2 1