NUMBER SYSTEMS A set of values used to represent different quantities is known as Number System The computer translates letters or words in numbers as computers can understand only numbers. A computer can understand digits and symbols represent different values depending on the position they occupy in the number.
NUMBER SYSTEMS A value of each digit in a number can be determined using The digit The position of the digit in the number The base of the number system (where base is defined as the total number of digits available in the number system).
Some important number systems are as follows. Binary number system Decimal number system Octal number system, Hexadecimal number system
BINARY NUMBER SYSTEM Binary number system Also called the “Base 2 system” The binary number system is used to model the series of electrical signals computers use to represent information 0 represents the no voltage or an off state 1 represents the presence of voltage or an on state
BINARY NUMBER SYSTEM Characteristics of binary number system are as follows: Uses two digits, 0 and 1. Also called base 2 number system Each position in a binary number represents power of the base (2). Example 2 Example: Binary Number : 101 2 5
Binary Numbering Scale Base 2 Number Base 10 Equivalent 000 001 1 010 2 011 3 100 4 101 5 110 6 111 7 Power Positional Value 2 1 2 1 2 2 2 4 2 3 8 2 4 16 2 5 32 2 6 64 2 7 128
DECIMAL NUMBER SYSTEM Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal number system, the successive positions to the left of the decimal point represent units, tens, hundreds, thousands and so on. (2x100)+ (3x10)+ (4xl) (2x10 2 )+ (3x10 1 ) + (4xl0 ) 200 + 30 + 4 234
Hexadecimal Number System Base 16 system Uses digits 0-9 & letters A,B,C,D,E,F Groups of four bits represent each base 16 digit
HEXADECIMAL NUMBER SYSTEM Characteristics of hexadecimal number system : Uses 10 digits and 6 letters, 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. Letters represents numbers starting from 10. A = 10. B = 11, C = 12, D = 13, E = 14, F = 15. Also called base 16 number system Each position in a hexadecimal number represents a power of the base (16). Example 16 Example Hexadecimal Number : 1A 16 26
S.N. Number System and Description 1 Binary Number System Base 2. Digits used : 0, 1 2 Octal Number System Base 8. Digits used : 0 to 7 3 Decimal Number System Base 10. Digits used : 0 to 9 4 Hexa Decimal Number System Base 16. Digits used : 0 to 9, Letters used : A- F
Significant Digits Binary: 11101101 Most significant digit Least significant digit Hexadecimal: 1D63A7A Most significant digit Least significant digit
Decimal to Binary Conversion Convert 67 to its binary equivalent: Step 1: 67 / 2 = 33 R 1 Divide 67 by 2. Record quotient in next row Step 2: 33 / 2 = 16 R 1 Again divide by 2; record quotient in next row Step 3: 16 / 2 = 8 R Repeat again Step 4: 8 / 2 = 4 R Repeat again Step 5: 4 / 2 = 2 R Repeat again Step 6: 2 / 2 = 1 R Repeat again Step 7: 1 / 2 = 0 R 1 STOP when quotient equals 0 1 0 0 0 0 1 1 2
Binary to Decimal Conversion Convert (10101101) 2 to its decimal equivalent: Binary 1 0 1 1 1 0 1 Positional Values x x x x x x x x 2 2 1 2 2 2 3 2 4 2 5 2 6 2 7 128 + 0 + 32 + 0 + 8 + 4 + 0 + 1 Products 173 10
Decimal to Hexadecimal Conversion Convert 830 10 to its hexadecimal equivalent: 830 / 16 = 51 R14 51 / 16 = 3 R3 3 / 16 = 0 R3 33E 16 = E in Hex
Hexadecimal to Decimal Conversion Convert 3B4F 16 to its decimal equivalent: Hex Digits 3 B 4 F x x x 16 3 16 2 16 1 16 12288 + 2816 + 64 + 15 15,183 10 Positional Values Products x
Binary to Hexadecimal Conversion The easiest method for converting binary to hexadecimal is to use a substitution code Each hex number converts to 4 binary digits