First time here? Checkout the FAQ!
x
0 votes
361 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$

    $Two's complement  = one's complement + 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 × 2^7) + (1 × 2^6) + (1 × 2^5) + (0 × 2^4) + (1 × 2^3) + (1 × 2^2) + (1 × 2^1) + (1 × 2^0))d  = -111d$

    2.

    $00010001(tc8) = ((0 × 2^6) + (0 × 2^5) + (1 × 2^4) + (0 × 2^3) + (0 × 2^2) + (0 × 2^1) + (1 × 2^0))d = 17d$

    3.

    $01111111(tc8) = ((1 × 2^6) + (1 × 2^5) + (1 × 2^4) + (1 × 2^3) + (1 × 2^2) + (1 × 2^1) + (1 × 2^0))d = 127d$

    4.

    $0000000 (tc8) = ((0 × 2^6) + (0 × 2^5) + (0 × 2^4) + (0 × 2^3) + (0 × 2^2) + (0 × 2^1) + (0 × 2^0))d = 0d$

    5.

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


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