0
2.8kviews
Number system and codes

a) Convert $(121.2)_3$ into base 10 (2 M | May 2015) - b) Represent $(52)_{10}$ into Excess-3 code and Gray code. (2 M | May 2015) - c) Find 1’s complement and 2’s complement of $(57)_{10}$ .(2 M | May 2015) - d) Obtain hamming code for 1 0 1 1 (2 M | May 2015) - e) Convert $(126)_{10}$ into Hex and Octal No. (2 M | May 2015) - f) Convert $(214.32)_{10}$ to binary (2 M | May 2015) - g) Perform Binary subtraction using 2’s complement for $(62)_{10}$ and $(99)_{10}$ (2 M | May 2015) -

1 Answer
0
9views

a) Convert $(121.2)_3$ into base 10

N$=1×3^2+2×3^1+1×3^0+2×3-1 \\ = 9+6+1+0.66\\ = 16.66$

$(121.2)_3=(16.66)_{10}$

b) Represent $(52)_{10}$ into Excess-3 code and Gray code.

Excess-3 code

Separate each digit and represent in their binary format

$\hspace{0.5cm}0 1 0 1\hspace{0.3cm}0 0 1 0$

Now, add 0 0 1 1 to each part

enter image description here

c) Find 1’s complement and 2’s complement of $(57)_{10}$ .

Binary Representation of $(57)_{10}$ is= 1 1 1 0 0 1

i.1’s Complement Representation:-

The one’s complement of binary number is number that results when we change all O’s to one and 1’s to zeros.

enter image description here

ii.2’s Complement Representation:-

The 2’s complement of binary number is number that results when we add 1 to the 1’s complement.

2’s complement = 1’s complement+ 1

enter image description here

d) Obtain hamming code for 1 0 1 1

enter image description here

For P1 : Location 1, 3, 5, 7

$\hspace{1.1cm}$ Bit Location 3, 5 and 7 having three 1’s therefore, to have and an even parity

$\hspace{1.1cm}$ P1 must be 1

For P2 : Location 2, 3, 6 and 7

$\hspace{1.1cm}$ Location bit having two 1’s and therefore,

$\hspace{1.1cm}$ P2 must be 0

For P4 : Location 4, 5, 6, 7

$\hspace{1.1cm}$ Bit Location 5, 6 and 7 having two 1’s therefore,

$\hspace{1.1cm}$ P4 must be 0

Now, hamming code for 1 0 1 1= 1 0 1 0 1 0 1

e) Convert $(126)_{10}$ into Hex and Octal No.

Hexadecimal conversion:

enter image description here

$$(126)_{10}= (7E)_{16}$$

enter image description here

$(126)_{10} =(176)_8$

f) Convert $(214.32)_{10}$ to binary

Conversion of integer part by successive division method

Conversion of integer part by successive division method

enter image description here

g) Perform Binary subtraction using 2’s complement for $(62)_{10}$ and $(99)_{10}$

  • Binary representation for $(62)_{10}$=0 1 1 1 1 1 0
  • Binary representation for $(99)_{10}$=1 1 0 0 0 1 1
  • Obtain 2’s complement of $(99)_{10}$ =

enter image description here

  • Add $(62)_{10}$ to 2’s complement of $(99)_{10}$=

enter image description here

Carry indicates that it is in 2’s complement form and result is negative.

  • Take 2’s complement of result=

enter image description here

Please log in to add an answer.