







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








Module - 1 NUMBER SYSTEMS & CODES
Advantages of Digital system over Analog system
For Ex: 1001.01 2 = [ ( 1 ) × 2^3 ] + [ ( 0 ) × 22 ] + [ ( 0 ) × 2^1 ] + [ ( 1 ) × 20 ] + [ ( 0 ) × 2-^1 ] + [ ( 1 ) × 22 ] 1001.01 2 = [ 1 × 8 ] + [ 0 × 4 ] + [ 0 × 2 ] + [ 1 × 1 ] + [ 0 × 0.5 ] + [ 1 × 0.25 ] 1001.01 2 = 9.25 10 Decimal Number system The decimal system has ten symbols: 0,1,2,3,4,5,6,7,8,9. In other words, it has a base of 10. Octal Number System Digital systems operate only on binary numbers. Since binary numbers are often very long, two shorthand notations, octal and hexadecimal, are used for representing large binary numbers. Octal systems use a base or radix of 8. It uses first eight digits of decimal number system. Thus it has digits from 0 to 7. Hexa Decimal Number System The hexadecimal numbering system has a base of 16. There are 16 symbols. The decimal digits 0 to 9 are used as the first ten digits as in the decimal system, followed by the letters A, B, C, D, E and F, which represent the values 10, 11,12,13,14 and 15 respectively. Decima l Binar y Octal Hexadeci mal 0 0000 0 0 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 7 7 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F
Number Base conversions The human beings use decimal number system while computer uses binary number system. Therefore it is necessary to convert decimal number system into its equivalent binary. i) Binary to octal number conversion ii) Binary to hexa decimal number conversion iii) Octal to binary Conversion iv) Hexa to binary conversion v) (^) Octal to Decimal conversion Ex: convert 4057.06 8 to octal =4x8^3 +0x8^2 +5x8^1 +7x8^0 +0x8-^1 +6x8-^2 =2048+0+40+7+0+0.
= 0.800x16 -- 12.8 ↓ 0.800x16 -- 12. =0.800x16 -- 12. =0.ACCC 16 2598.675 10 = A26.ACCC 16 ix) Octal to hexadecimal conversion: The simplest way is to first convert the given octal no. to binary & then the binary no. to hexadecimal. Ex: 756.603 8 7 5 6. 6 0 3 111 101 110. 110 000 011 0001 1110 1110. 1100 0001 1000 1 E E. C 1 8 x) Hexadecimal to octal conversion: First convert the given hexadecimal no. to binary & then the binary no. to octal. Ex: B9F.AE =5637. Complements: In digital computers to simplify the subtraction operation & for logical manipulation complements are used. There are two types of complements used in each radix system. i) The radix complement or r’s complement ii) The diminished radix complement or (r-1)’s complement
Representation of signed no.s binary arithmetic in computers:
Methods of obtaining 2’s comp of a no:
11010011 is 2‘s comp form II method: Subtract the given no. N from 2 n 2 n^ = 100000000 Subtract 45= - 00101101 +
11010011 is 2‘s comp III method: Original no: 00101101 Copy up to First 1 bit 1 Compliment remaining : 1101001 bits 11010011 Ex:
= 11110010 2‘s comp +46 = 00101110
1’s compliment arithmetic: In 1‘s comp subtraction, add the 1‘s comp of the subtrahend to the minuend. If there is a carryout , bring the carry around & add it to the LSB called the end around carry. Look at the sign bit (MSB). If this is a 0, the result is +ve & is in true binary. If the MSB is a 1 ( carry or no carry ), the result is – ve & is in its is comp form .Take its 1‘s comp to get the magnitude inn binary. Ex: Subtract 14 from 25 using 8 bit 1‘s EX: ADD - 25 to + 25 = 00011001 +14 = 00001110
No carry MSB = 00001011 result=-ve=-^1110 MSB is a 0 so result is +ve (binary ) =+11 10