The Binary Number System: It is a code that uses only two symbols. The symbols are 0 &1 This binary symbols are called binary digits. It is used only 2 digits so that it is called base – 2 number system. A binary digit is also called a Bit(Binary Digit). The highest value symbol in the binary number system is 1. Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 2 We can form combinations of bits 0 &1 to represent numbers greater than 1. Like that decimal combinations. 0,1,2,3,4,5,6,7,8,9 then combined these numbers to form the numbers greater than 9. 0 1 2 3 …….9 likewise. 10 12 13 …….19 0 1 2 3 …….9 likewise. 20 21 23 …….29 After reaching 99 two digit combinations are exhausted. We use three digit combinations 100,101,102 etc. The combination of binary number system 0 1 = 10, 11,100 Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 3 Binary equivalents of decimal numbers from 0 to 15 DECIMAL BINARY 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 4 Base or Radix: The binary number system is a base-2 system. It uses only 2 symbols (0 & 1). A Base or Radix of a number system refers to the number of basic symbols used. Number systems No. of symbols Binary 2 – (0 &1) 2 Decimal 10 – (0 to 9) 10 Octal 8 – (0 to 7) 8 Hexadecimal 16 – (0 to 9 & A/a to F/f) 16 A – 10, B- 11, C-12, D – 13, E-14 & F- 15 Base / Radix Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 5 Conversions: 12 conversions are there. They are Binary to Decimal Binary to octal Binary to Hexadecimal Decimal to Binary Decimal to Octal Decimal to Hexadecimal Octal to Binary Octal to Decimal Octal to Hexadecimal Hexadecimal to Binary Hexadecimal to Decimal Hexadecimal to Octal Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 6 In a decimal numbers each digit position has a weight. Position is considered as right to left. Position Weight 1st 1 2nd 2 3rd 4 4th 8 and so on For Example, 64 32 16 8 4 2 1 0.0625 0.125 26 25 24 23 22 21 20 2-4 2-3 Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 0.25 0.5 2-2 2-1 7 1. (100)2 =(?) 10 1 0 0 20 X 0 = 1X0 = 0 21 X 0 = 2X0 = 0 22 X 1 = 4X1 = 4 4 (100)2 =(4) 10 Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept. of CA, CCW, Trichy. 8 2. (0.1001)2=(?)10 0.1 0 0 1 2 -4 X 1 = 0.0625 2 -3 X 0 = 0 2 -2 X 0 = 0 2 -1 X 1 = 0.5 20 X0=0 0.5625 Ms.V.Yasodha M.C.A.,M.Phil.,SET.,Dept of CA,CCW,Trichy. 9