Page 1 :
NUMBER SYSTEMS AND, BINARY CODES, 1.0 INTRODUCTION, Number systems use different number bases. A number base indicates how, many different digits are available when using a particular numbering system. For, example, decimal is number base 10, which means it uses ten digits: 0, 1, 2, 3, 4, 5, 6,, 7, 8 and 9. Binary is number base 2, which means that it uses two digits: 0 and 1., Different number bases are needed for different purposes. Humans use number base, 10 whereas computers use binary. The base of octal number system is 8 and, hexadecimal is 16. Hexadecimal (or Hex) is particularly useful for representing large, numbers as fewer digits are required. Hex is used in a number of ways., S.No., Number system, Base or Radix, Symbols used, 1., Decimal, 10, 0,1.2,3,4,5,6.7,8,9, 2., Binary, 2., 0,1, 3., Octal, 0,1,2,3,4,5,6,7, 4., Hexadecimal, 16, 0,1,2,3,4,5.6,78,9, A.B.C.D.E.F, 1.1 BINARY NUMBER SYSTEM, Radix or Base of number system: The total number of digits or basic symbols, used in the number system is known as the radix or base of number system., The number system whose base is two is known as the binary number, system., The symbols used in binary number system are 0 and 1., Bits: 0 and 1 are called as binary digits or bits,, Nibble: The group of four bits is called nibble. e.g., 1011, Byte: The group of eight bits is called byte, eg. 10110101, MSB: The left-most bit is called most significant bit (MSB), LSB: The right-most bit is called least significant bit (LSB), 1.1.1 Binary to Decimal Conversion, Any binary number can be converted into its equivalent decimal number using, the weights assigned to each bit position as per positional number system method as, given below.
Page 2 :
DE 6, Basic Analog and Digital Electronics for Beginners, 2. (32.4 )= (---) 10, Solution:, (34.4),=3 x 8+2x 8" +4 x 8 = 24 +2 +4/8 = 26 +0.5 = 26.5, (34), (26.5) 10, 1.2.2 Decimal to Octal Conversion (Octal-dabble method) :, 1. For Integer part:, Divide the given decimal number by 8 and write down quotient and, remainder., Take quotient and again divide it by 8. Write down quotient and remainder, Repeat the same process of division till we get the quotient as zero., The remainders taken in reverse order give the equivalent octal number., 2., For fractional part., Step 1: Multiply the given fractional part by 8., Step 2: Record the carry in the integer position., Step 3: Take the fractional part of step 2 and multiply it by 8. Record the carry, in the integer position,, Step 4: Repeat the same process till we get fractional part as zero or until we, have as many digits as necessary for our application., Step 5: The carries taken in forward order give the equivalent octal fractional, number., Example:, 1., (46.72) t6 (---), Solution:, For integer part:, (46) 10=(-), Quotient Remaindet, 1SD, 46, MSD, (46) t0= (56),, For Fractional part:, (0.72) 10 =(--), Fraction, 0.76, 0.08, 0.64, Integer, 0.72 x 8 5:76, 0.76 x 8-6.08, 0.08 x 8 0.64, 0.64 x 8=5.12, 0.12, 5., (0.72) 10 (0.5605),, %3D, Ans: (46 72) 10=(56.5605),, 560
Page 3 :
7 DE, Number Systems and Binary Codes, 1.2.3. Octal to Binary Conversion:, To convert a octal number to a binary number, convert cach octal digit to its, 3-bit binary equivalent., Decimal, Octal, Binary, 421, 0., 000, 001, 2., 010, 3., 3., 011, 4, 4, 100, 5., 101, 6., 110, Example :, 1. (234.67)= (-----)2, Solution:, (234.67) = (010 011 100. 110 111)2, 3 4, (2, 6 7) 10, (010 011 100, 110 111):, 1.2.4 Binary to Octal Conversion, Make groups of three bits starting from binary point to the right side for, fractions and to the left side for integers. Add Os if necessary, at each end., Convert each group of 3-bits to its octal equivalent., Example:, 1. (10111.1011)2=(---),, Solution:, (10111 1011), 个 个 个, 010 111 101100, 丁, (10111.1011) 2=(27.54),, 1.3. HEXADECIMAL NUMBER SYSTEM, The number system whose base is 16 is known as hexadecimal number, system., The basic symbols used in hexadecimal number system are:, 0,1,2,3,4,5,6,7,8,9.A,B,C,D,E.F
Page 4 :
DE 8, Basic Analog and Digital Electronics for Beginners, Advantages of Hexadecimal Number : Hexadecimal number requires less, number of bits than decimal or binary number system. Therefore to specify, the addresses in microcomputers, hexadecimal number system is preferred, which saves a time and energy., 1.3.1 Hexadecimal-to-Decimal Conversion:, Any hexadecimal number can be converted into its equivalent decimal number, using the weights assigned to each digit position as given below., Hexadecimal Point, 16 16 16 16' 16, 16 16 16 | Weights, Example:, 1. (FA2)16 =(--) 10, Solution:, (FA2)6 = Fx 16 +A 16' +2 x 16, 15x 256+ 10x 16+2 x 1, = 3840 +160+2, = 4002, (FA2)= (4002)10, 2. (2B.2F)16 = (---lio, Solution:, (2B.2F)1=2 x 16' + B 16" +2 x 16' + F x 16*, 2 15, = 32+11+, 16 16, = 43.1836, (2B.2F)16 =(43.1836)10, 1.3.2 Decimal-to-Hexadecimal Conversion (Hex-dabble method):, 1. For Integer part:, Divide the given decimal number by 16 and write down quotient and, remainder., Take quotient and again divide it by 16. Write down quotient and remainder, Repeat the same process of division till we get the quotient as zero., The remainders taken in reverse order give the equivalent Hexadecimal, number., 2., For fractional part., Step 1: Multiply the given fractional part by 16., Step 2: Record the carry in the integer position.
Page 5 :
9 DE, Number Systems and Binary Codes, Step 3: Take the fractional part of step 2 and multiply it by 16. Record the carry, in the integer position., Step 4: Repeat the same process till we get fractional part as zero or until we, have as many digits as necessary for our application., Step 5: The carries taken in forward order give the equivalent hexadecimal, fractional number., Example:, 1. (334. 789) 10 = (-----) 16, TO, Solution:, A. Integer part:, Quot ent, 20, 20 1, Remainder, LSD, 334, 16, 16, 16, 4., MSD, (334)10 (14E)16, %3D, Fractional part, Fraci on, 0624, 0.984, 0.744, 0.884, Carry, 12 C, 0789 x 16 12.624, 0.624 x 16 9.984, 0.984 x 16 15.744, 0.744 x 16 11.884, 15 F, 11 B, .(0.789)10 =(0.C9FB)16, OR, 0.744, 16, 0.984, 0 789, 16, 0.624, 16, Fraction part, 16, 12.624, 9984, 15.744, 11 384, Carry in decimal, 12, 6., 15, 11, Carry in Hexadecimal, 9., F, B., Hexadecimal Point, (334.789),0-(14E.C9FB)6, 1.3.3 Hexadecimal to Binary Conversion:, To convert a hexadecimal number to a binary number, convert each, hexadecimal digit to its 4-bit binary equivalent,, B.