Question

In: Computer Science

Suppose 8 bits are used to store signed integers. The largest value that can be represented...

  1. Suppose 8 bits are used to store signed integers. The largest value that can be represented is 0111 1111. What is the decimal value of that number?

127

128

177

178

  1. 2.Suppose a 6-bit storage unit is used to store unsigned integers. What is the binary representation of the decimal number 67?

01000011

1000011

010000

000011

Solutions

Expert Solution

Qn 1)

Binary : 01111111

Since the 8 bits are used to store signed integers, the msb(most significant bit) which is the leftmost bit is used to store the sign, shown as the red bit. If the value of this bit is 0, then the value is positive. If the value of this bit is 1 then the value is negative.

Here the sign bit is 0, i.e. the value is positive.

The rest of the bits (1111111) represent the value stored which in decimal is 127.

So the answer is 127.

Qn 2)

Decimal : 67

Here the value is unsigned but there is only 6 bits of storage. The range of 6 bit unsigned value is from 0 to 63. i.e, the least value that can be stored is 0 and the largest value that can be stored in it is 63.

But the given value exceeds the range. i.e, 67(1000011) cannot be stored as a 6 bit binary.

The given options :

01000011 represents 67 but uses 8 bits.

1000011 represents 67 but uses 7 bits.

010000 represents 16 but uses 6 bits.

000011 represents 3 but uses 6 bits.

If the value 67 is represented in 6 bits it will of the form 000011, where the rest of the bits will be truncated.

1 000011 => red part is truncated while the green part is stored in the 6 bits.


Related Solutions

Fill in the following table to show how the given integers are represented, assuming 16 bits...
Fill in the following table to show how the given integers are represented, assuming 16 bits are used to store values and the machine uses 2’s complement notation. (This is not necessarily MARIE.) Give values in the last two columns in hexadecimal as they would appear memory assuming the byte at address a is on the left and the byte at the address a+1 is on the right. 2-Byte Big 2-Byte Little Integer Binary Hex Endian (hex) Endian (hex) Example...
A byte is made up of 8 bits although a byte is rarely represented as a...
A byte is made up of 8 bits although a byte is rarely represented as a string of binary digits or bits. Instead, it is typically presented as a pair of hexadecimal digits where each digit represents 4 bits or half a byte or "nibble." We have been reading in hex digits and outputting their decimal value, but what we really want to do is create a byte from a pair of hex digits read from input. Create a C...
1a. What is the largest negative number that you could represent with 7 bits using signed...
1a. What is the largest negative number that you could represent with 7 bits using signed magnitude? Show your work. 1b. What is the largest positive number that you could represent with 7 bits using 2’s complement? Show your work. 1c. Add the following two binary numbers 10110111 + 1011 = :Show your work. 1d. Solve the following decimal notation equation using 8-bit binary numbers and 2’s complement notation: 69 - 7 = :Show your work
Interpret these signed 8-bit sequences with each type of signed/unsigned encoding. Remember the bits are arbitrary!...
Interpret these signed 8-bit sequences with each type of signed/unsigned encoding. Remember the bits are arbitrary! They can be interpreted in many different ways. C.1: Complete the following table using decimal (base-10) numbers. The first line is already completed for you bit sequence unsigned sign-magnitude 1s’ complement 2’s complement 00000101 +5 +5 +5 +5 11110001 ? ? ? ? 01010011 ? ? ? ? 10000000 ? ? ? ? 11111111 ? ? ? ?
Give the signed decimal value of D03 (12 bits, show work)
Give the signed decimal value of D03 (12 bits, show work)
1. Give the signed decimal value of A93 (12 bits, show work)
1. Give the signed decimal value of A93 (12 bits, show work)
Suppose that two integers from the set of 8 integers {1, 2, … , 8} are...
Suppose that two integers from the set of 8 integers {1, 2, … , 8} are choosen at random. Find the probability that 5 and 8 are picked. Both numbers match. Sum of the two numbers picked is less than 4. [3+3+4 marks] Suppose that you pick a bit string from the set of all bit strings of length ten. Find the probability that: The bit string has the sum of its digits equal to seven. The bit string has...
Suppose a block cipher uses m-to-m bits S-boxes. How many bits are required to store the...
Suppose a block cipher uses m-to-m bits S-boxes. How many bits are required to store the look-up table of k different such m-to-m bits S-boxes? Give a formula in terms of k and m. Hint: A look-up table for one DES S-box requires 256 bits of storage.
The range of integers that can be represented by this 12-bit construction is -255 to 255...
The range of integers that can be represented by this 12-bit construction is -255 to 255 (a 9-bit signed integer has a range of -256 to 255). What are the floating-point representations for the first eight, odd, positive, decimal integers (i.e., 1, 3, 5, 7, 9, 11, 13, 15) in this 12-bit notation?
10. Convert 101 1010 (seven bits) into a signed decimal (show work) 15. Give the value...
10. Convert 101 1010 (seven bits) into a signed decimal (show work) 15. Give the value of 011 1101 and C=0 with ROL (seven bits, show work) 16. Give the signed decimal value of 93A (12 bits, show work) 18. Give the binary equivalent of the decimal number of 13.57 (assume fixed point, no more than 6 bits left and right of the decimal point)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT