Question

2. a) What decimal number does the bit pattern 0×0C000000 represent if it is a two’s...

2. a) What decimal number does the bit pattern 0×0C000000 represent if it is a two’s complement integer? An unsigned integer? b) What decimal number does the bit pattern 0×0C000000 represent if it is a floating point number? Use the IEEE 754 standard. c) If the bit pattern 0×0C000000 is placed into the Instruction Register, what MIPS instruction will be executed?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
2)
a)
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from hexadecimal to binary
Converting 0C000000 to binary
0 => 0000
C => 1100
0 => 0000
0 => 0000
0 => 0000
0 => 0000
0 => 0000
0 => 0000
So, in binary 0C000000 is 00001100000000000000000000000000

since left most bit is 0, this number is positive
so, we can directly convert this into a decimal value
=> 1100000000000000000000000000
=> 1x2^27+1x2^26+0x2^25+0x2^24+0x2^23+0x2^22+0x2^21+0x2^20+0x2^19+0x2^18+0x2^17+0x2^16+0x2^15+0x2^14+0x2^13+0x2^12+0x2^11+0x2^10+0x2^9+0x2^8+0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 1x134217728+1x67108864+0x33554432+0x16777216+0x8388608+0x4194304+0x2097152+0x1048576+0x524288+0x262144+0x131072+0x65536+0x32768+0x16384+0x8192+0x4096+0x2048+0x1024+0x512+0x256+0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 134217728+67108864+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0+0
=> 201326592
Answer in two's complement is 201326592
Answer in unsigned is also 201326592

b)
Hexadecimal     Binary
    0           0000
    1           0001
    2           0010
    3           0011
    4           0100
    5           0101
    6           0110
    7           0111
    8           1000
    9           1001
    A           1010
    B           1011
    C           1100
    D           1101
    E           1110
    F           1111
Use this table to convert from hexadecimal to binary
Converting 0C000000 to binary
0 => 0000
C => 1100
0 => 0000
0 => 0000
0 => 0000
0 => 0000
0 => 0000
0 => 0000
So, in binary 0C000000 is 00001100000000000000000000000000
00001100000000000000000000000000
0 00011000 00000000000000000000000
sign bit is 0(+ve)
exp bits are 00011000
   => 00011000
   => 0x2^7+0x2^6+0x2^5+1x2^4+1x2^3+0x2^2+0x2^1+0x2^0
   => 0x128+0x64+0x32+1x16+1x8+0x4+0x2+0x1
   => 0+0+0+16+8+0+0+0
   => 24
in decimal it is 24
so, exponent/bias is 24-127 = -103
frac bits are

IEEE-754 Decimal value is 1.frac * 2^exponent
IEEE-754 Decimal value is 1. * 2^-103
1. in decimal is 1
   => 1.
   => 1x2^0
   => 1x1
   => 1
   => 1
so, 1 * 2^-103 in decimal is 9.860761315262648e-32
so, 00001100000000000000000000000000 in IEEE-754 single precision format is 9.860761315262648e-32
Answer: 9.860761315262648e-32

c)
000011 00000000000000000000000000
opcode is 000011 (3). so, this is a jal instruction
MIPS instruction is jal 0
Answer: jal 0
Add a comment
Know the answer?
Add Answer to:
2. a) What decimal number does the bit pattern 0×0C000000 represent if it is a two’s...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT