0% found this document useful (0 votes)
6 views3 pages

Error&shift

Lecture for ITPEC

Uploaded by

mohmoh8416
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Error&shift

Lecture for ITPEC

Uploaded by

mohmoh8416
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Related Problems

1. Which of the following represents the hexadecimal fraction 0.C16 as a decimal


fraction?
(a) 0.12 (b) 0.55 (c) 0.75 (d) 0.84
2. Which of the following represents the decimal fraction 65.8 as a hexadecimal
fraction?
(a) 41.816 (b) 81.1016 (c) 41.CC16 (d) 105.4016
3. Among the 1-byte data with equal numbers of 0s and 1s, which of the following
represents the largest unsigned binary integer as a decimal integer?
(a) 120 (b) 127 (c) 170 (d) 240
4. Which of the following is the appropriate binary fraction that is equivalent to the
decimal value 5.525? Here, the binary string enclosed in parentheses is repeated
infinitely.
(a) 101.11 (b) 101.100011 (c) 101.10(0011) (d) 101.100(0011)
5. When the equation “100n–34n=44n” holds, which of the following represents
26n? Here, each number is written in radix notation; that is, each subscript “n”
indicates the radix. In addition, when there is no subscript, the radix 10 is
implied.
(a) 18 (b) 20 (c) 22 (d) 38
6. For two 8-bit signed integers A and B in 2’s complement format, which of the
following will cause an overflow when the addition of A and B is executed?
A B
(a) 0111 1111 1111 1110
(b) 0111 1111 0111 1110
(c) 1000 0000 0111 0000
(d) 1111 1111 1111 1111
7. When 4-bit signed numbers in 2's complement are used, which of the following
operations will cause either an overflow or an underflow?
(a) Add B to A when A is 0110 and B is 1111.
(b) Add B to A when A is 1110 and B is 0110.
(c) Subtract B from A when A is 0111 and B is 1010.
(d) Subtract B from A when A is 1111 and B is 1111.
8. For an eight-bit integer x represented in two’s complement format, which of the
following yields the value of 5x? Here, the overflow or underflow can be
ignored in this multiplication.
(a) Shift x to the left by 1 bit, then add the initial value of x to it.
(b) Shift x to the left by 2 bits, then add the initial value of x to it.
(c) Shift x to the right arithmetically by 1 bit, then subtract the initial value of x
from it.
(d) Shift x to the right arithmetically by 2 bits, then subtract the initial value of x
from it.
9. Which of the following is an appropriate method for checking if an 8-bit
unsigned value x is a multiple of 16?
(a) The logical product of x and each bit of the binary value 00001111 results in
all zeros.
(b) The logical sum of x and each bit of the binary value 00001111 results in all
zeros.
(c) The logical product of x and each bit of the binary value 11110000 results in
all zeros.
(d) The logical sum of x and each bit of the binary value 11110000 results in all
zeros.
10. There is a register where an integer value is stored in binary. Let x be a positive
integer which is stored into the register, then perform the operations below.
(1) Shift the content of the register to the left by 2 bits
(2) Add x to the register.
How many times larger than the integer x is the content of the register?
(a) 3 (b) 4 (c) 5 (d) 6
11. There is an 8-bit register where integers are represented in binary by using 2’s
complement for negative numbers. When the decimal integer “– 24” is stored in
the register and the arithmetically shifted 2 bits right, what is the resulting value
in decimal? Here, the leftmost bit of the register is used as a sign bit.
(a) –102 (b) – 96 (c) –6 (d) 58

You might also like