Math, asked by nandawakte6059, 1 year ago

if x=01110 and y=11001 are two 5 bit binary numbers represented in two's complement format the sum of x and y represented in two's complemented foromat usng 6 bit

Answers

Answered by pravinsir
23
x = 01110

= 0×2^4 + 1×2^3 + 1×2^2 + 1×2^1 + 0×2^0

= 0 + 8 + 4 + 2 + 0

= 14


y = 11001

y = 1×2^4 + 1×2^3 + 0×2^2 + 0×2^1 + 1×2^0

= 16 + 8 + 0 + 0 + 1

= 25


so x + y = 14 + 25 = 39

39 now in binary

39 = 32 + 4 + 2 + 1

= 2^5 + 2^2 + 2^1 + 2^0

= 1 × 2^5 + 0 × 2^4 + 0 × 2^3 + 1 × 2^2 + 1 × 2^1 + 1 × 2^0

= 100111

Answered by PravinRatta
3

Given,

x = 01110 and y=11001 are two 5 bit binary numbers represented in two's complement format.

To Find,

the sum of x and y represented in two's complemented format using 6 bit.

Solution,

x = 01110

  = 0 x 2^{4} + 1 x 2³+ 1 x 2² + 1 x 2^{1}+ 0 x 2^{0}

  = 0+8+4+2+0

  = 14

y = 11001

  = 1 x 2^{4} + 1 x 2^{3} + 0 x 2^{2} + 0 x 2^{1} + 1 x 2^{0}

  = 16 + 8 + 0 + 0 + 1

  = 25

therefore, x+y = 14 + 25 = 39

the sum of x and y is 39 which is a binary number

now, 39 in two's complemented format using 6 bit

39 = 32 + 4+2 +1

     =2^{5} + 2^{2} + 2^{1}+2^{0}

     = 1 x 2^{5} + 0 x 2^{4} + 0 x 2^{3} + 1 x 2^{2} + 1 x  2^{1} + 1 x 2^{0}

     = 100111

Hence the sum of x and y represented in two's complemented format using 6 bit is 100111.

Similar questions