First time here? Checkout the FAQ!
x
0 votes
390 views
asked in Discrete Mathematics by (116k points)  

Q1) Calculate tc8 of -117, -127, 127, 0

Q2) What values are stored in the following tc8 registers:

  1. 10010001
  2. 00010001
  3. 01111111
  4. 0000000
  5. 11111111
  

1 Answer

+1 vote
answered by (840 points)  
selected by
 
Best answer
Q1-ANS)
for -117d:

    117d=(01110101)b

    (01110101)b=10001010(oc8)+1=10001011(tc8)

for -127d:

    127d=(01111111)b

    (01111111)b=10000000(oc8)+1=10000001(tc8)

for 127d:

    127d=01111111b=01111111(tc8)

for 0d:

    0d=00000000b

    Twoscomplement=onescomplement+1=11111111(oc8)+1=00000000(tc8)

    due to overflow the 9th digit is removed


Q2-ANS)

    1.

    10010001(tc8)=(01101110+1)d=(01101111)b=((0×27)+(1×26)+(1×25)+(0×24)+(1×23)+(1×22)+(1×21)+(1×20))d=111d

    2.

    00010001(tc8)=((0×26)+(0×25)+(1×24)+(0×23)+(0×22)+(0×21)+(1×20))d=17d

    3.

    01111111(tc8)=((1×26)+(1×25)+(1×24)+(1×23)+(1×22)+(1×21)+(1×20))d=127d

    4.

    0000000(tc8)=((0×26)+(0×25)+(0×24)+(0×23)+(0×22)+(0×21)+(0×20))d=0d

    5.

    11111111(tc8)=(00000000+1)b=(00000001)=1d


Answer submitted by Amirhossein Azizafshari from Thursday 1 PM class.
...