Number System – Overview YASH PAL, April 2, 2022November 19, 2022 In a digital computer everything, whether it is some data, result, or instruction, has to be represented using only 0s and 1s. This is because the digital computer basically uses transistors that are made to work in the ‘OFF’ state or in the ‘ON’ state. The ‘OFF’ state is generally represented as the logic ‘0’ and the ‘ON’ state is represented as the logic ‘1’. This is called a binary number system. However, the decimal number system which includes 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 is convenient for the programmer and user. The radix or base of this number system is 10. the programmer feeds instructions and data in the alphabet and decimal digits. but for the operation of the computer, these are converted to binary numbers (0s and 1s). Types of Computer Number Systems Binary number system Octal number system Hexadecimal number system Binary coded decimal number ASCII (American standard code for information interchange) There are some other systems also, used to represent numbers. some of these are octal and hexadecimal number systems. digital systems like microprocessors, logic circuits, computers, etc. are usually designed to process hexadecimal or octal numbers. Binary number system The number system with base (or radix) two is known as the binary number system. the digits (0 and 1) are used to represent the numbers in this system. these are known as bits. it is a positional system, i.e. every position is assigned a specific weight. Decimal numbers with equivalent Binary Numbers Decimal Number Binary Number D1 D0 B3 B2 B1 B0 0 0 0 0 0 0 0 1 0 0 0 1 0 2 0 0 1 0 0 3 0 0 1 1 0 4 0 1 0 0 0 5 0 1 0 1 0 6 0 1 1 0 0 7 0 1 1 1 0 8 1 0 0 0 0 9 1 0 0 1 1 0 1 0 1 0 1 1 1 0 1 1 1 2 1 1 0 0 1 3 1 1 0 1 1 4 1 1 1 0 1 5 1 1 1 1 The above-given table shows the counting in the binary number system, with their equivalent decimal value. in the binary number system, a group of four bits is known as a nibble and a group of eight bits is known as a byte. Octal number system The number system with base (or radix) eight is known as the octal number system. in this system eight digits (0, 1, 2, 3, 4, 5, 6, and 7) are used to represent the numbers. similar to decimal and binary number systems, it is also a positional system. below given table shows the counting in octal numbers with its equivalent in decimal and binary systems. Decimal numbers with equivalent Binary and Octal Numbers Decimal Number Binary Number Octal Number D1 D0 B3 B2 B1 B0 O1 O0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 2 0 0 1 0 0 2 0 3 0 0 1 1 0 3 0 4 0 1 0 0 0 4 0 5 0 1 0 1 0 5 0 6 0 1 1 0 0 6 0 7 0 1 1 1 0 7 0 8 1 0 0 0 1 0 0 9 1 0 0 1 1 1 1 0 1 0 1 0 1 2 1 1 1 0 1 1 1 3 1 2 1 1 0 0 1 4 1 3 1 1 0 1 1 5 1 4 1 1 1 0 1 6 1 5 1 1 1 1 1 7 Hexadecimal number system The hexadecimal number system is very popular in computer uses. the base for hexadecimal numbers is 16. in this number system, 16 distinct symbols are required to represent the number. these are numerals 0 to 9 and alphabets A to F. Since numeric digits and alphabets both are used to reprint the digits in the hexadecimal number system. this is an alphanumeric number system. below given table show the hexadecimal numbers with their binary and decimal equivalents. HexaDecimal numbers with equivalent Binary and Decimal Numbers Hexadecimal Decimal Binary 0 0 0 0 0 0 1 1 0 0 0 1 2 2 0 0 1 0 3 3 0 0 1 1 4 4 0 1 0 0 5 5 0 1 0 1 6 6 0 1 1 0 7 7 0 1 1 1 8 8 1 0 0 0 9 9 1 0 0 1 A 10 1 0 1 0 B 11 1 0 1 1 C 12 1 1 0 0 D 13 1 1 0 1 E 14 1 1 1 0 F 15 1 1 1 1 Binary coded decimal (BCD) number In most microprocessor-based systems, data are entered and displayed in decimal numbers. however, the data processing inside the microprocessor is performed in binary. the data are entered through a decimal keyboard and the monitor program of the system converts each key into an equivalent 4-bit binary number. this number is known as a binary-coded decimal (BCD) number. after conversion, two BCD numbers are stored in an 8-bit register or a memory location. These numbers are called packed BCD. ASCII code The American standard code for information interchange (ASCII) is used commonly in data communication. it is a seven-bit code, and it’s 128 (2^7) combinations are assigned different alphanumeric characters. for example, the hex numbers 30H to 39H represent 0 to 9 ASCII decimal numbers, and 41H to 5AH represent capital letters A through Z. in this code, bit D7 is zero. When an ASCII character is entered through an ASCII keyboard, the microprocessor receives the binary equivalent of an ASCII hex number. Also, read Number system Arithmetic – Addition & Subtraction computer fundamentals engineering subjects microprocessor engineering subjectsmicroprocessor