You are on page 1of 4

Number Systems NUMBER SYSTEMS In any number system there is an ordered set of symbols known as digits with rules

defined for performing arithmetic operations like addition, multiplication etc. A collection of these digits make a number which in general has two parts- integer and fraction. BINARY NUMBER SYSTEM The number system with base two is known as the binary; number. Only two symbols are used to represent numbers in this system and these are 0 and 1. These are known as bits. It is a positional system, that is every position is assigned a specific weight. Binary to Decimal Conversion An example of binary number conversion is, 10 1101 . 10101 this can be written as, 1x25 + 0x24 + 1x23 + 1x22+ 0x21+ 1x20+ 1x2-1 + 0x2-2 + 1x2-3 + 0x2-4 + 1x2-5 = 32 + 8 + 4 + 1 + 0.5 + 0.125 + 0.03125 = 45 + 0.65625 = 45.65625 Decimal to Binary Conversion Decimal numbers can be easily converted to binary numbers by repeatedly dividing the decimal numbers by 2, and the remainder after each division is used to indicate the coefficients of the binary number to be formed. Then the binary number derived is written from bottom up. Example: 125 2 = 62 + remainder of 1 62 2 = 31 + remainder of 0 31 2 = 15 + remainder of 1 15 2 = 7 + remainder of 1 7 2 = 3 + remainder of 1 3 2 = 1 + remainder of 1 1 2 = 0 + remainder of 1 The binary representation of 125 is therefore 1111101 OCTAL NUMBER SYSTEM The octal number system has a base of radix of 8, Eight different symbols are used to represent numbers. These are commonly 0,1,2,3,4,5,6 and 7. Octal to Decimal number 1 I semester MCA PESIT

Number Systems

We use the same sort of polynomial as was used in the binary case, except that we now have a radix of 8 instead of 2 (in binary). Therefore 1213 in octal is 1x83+2x82+1x81+3x8 = 512 + 128+8+3 =651 in decimal. Also 1.123 in octal is 1x8+1x81+2x82+3x83 =1 + 1/8 + 2/64 + 3/512 =183/512 in decimal. Decimal to Octal number Conversion of decimal to octal can be performed by repeatedly dividing the decimal number by 8 and using each reminder as a digit in the octal number being formed. For example to convert 20010 to an octal representation we divide as follows. 200 8= 25 remainder is 0 25 8= 3 remainder is 1 3 8= 0 remainder is 3 Therefore 20010 = 3108 Notice that when the number to be divided is less than 8, we use 8 as the quotient and the number as the remainder. Let us check this 3108= 3x83 + lx81 + 0x8 =192 + 8 =20010 Binary to Octal number There is a simple trick of converting a binary number to an octal number. Simply group the binary digits into groups of 3, starting at the octal point and read each set of 3 binary digits according to the following table.

Let us convert the binary number 011101. First we break it into 3s (thus 011 101). Then converting each 3 binary digits we get 35 in octal. Therefore 011101 binary = 35 octal.

I semester MCA PESIT

Number Systems HEXADECIMAL NUMBER SYSTEM The hexadecimal number system is useful for the reason that most minicomputers and microcomputers have their memories organized into sets of bytes, each consisting of eight binary digits. Each byte is either used as a single entity to represent a single alpha-numeric character or broken into two 4-bit pieces. When the bytes are handled into two 4-bit character the programmer is given the option of declaring each 4-bit character as a piece of a binary number or a two BCD numbers, in which case it is equal to 24 in decimal or a two BCD character, in which case it is decimal number 18. When the machine is handling numbers in binary bit in groups of 4 digits. Since 16 possible different numbers can be represented, the digits 0 through 9 will not be sufficient so the letters A, B, C, D, and E are also used. The following table lists the binary and hexadecimal equivalent of decimal numbers 1 through 15.

Binary to Hexadecimal We simply break a binary number into groups of 4 digits and convert each group of 4 digits according to the preceding code. Thus (10111011)2 = BB16, (10010101)2=9516, (11000111)2=C716 etc. Hexadecimal to Decimal This is straight forward but time consuming. Example: BB represents Bx161+Bx16 =11x16+11x1 =176+11 =187. 3 I semester MCA PESIT

Number Systems Similarly AB616=10x162 + 11x161 + 6x16 =10x256 + 11x16 + 6 =2560 + 176 + 6 =274210. The chief use of the hexadecimal system is in connection with byte-organized machines. And since most computers now use now byte-organized, knowledge of hexadecimal is essential. Bits, Bytes, Nibbles and Word Size A single binary number (either a 0 or a 1) is called a bit. Bit is an abbreviation for a binary digit. The bit is the smallest unit of data in a digital system. Physically in a digital circuit a single bit is commonly represented by a HIGH or LOW voltage. On a magnetic storage medium (such as a floppy disk) a bit is a small section that can be either a 1 or 0. On an optical disk (such as a CD-ROM) a bit is a small area that either is a pit or no pit for a 1 or 0. All but the simplest digital devices handle larger data groups commonly called which in computer jargon may be called words. For most computer systems, the width of the main data bus is the same as the word size. For instance, a microprocessor might operate on and store 8-bit groups as a single unit of data. An 8-bit group of data that represents a number, letter, punctuation mark, control character, or some operation code (op code) in a digital device is called a byte. For instance, the hexadecimal number 4F is shorthand for the byte 0100 1111. A byte is an abbreviation for binary term. A half-byte or a 4-bit group of data is called a nibble. For instance, the hexadecimal number C is shorthand for the nibble 1100.

I semester MCA PESIT

You might also like