A desktop laser printer has a 300-pixel-per

advertisement
A desktop laser printer has a 300-pixel-per-inch resolution. If each pixel is stored in
one bit of memory how many bytes of memory are required to store the complete
image of one 8.5 X 11 inch of paper?
A. About 8 KB
B. About .5 MB
C. About 1 MB
D. About 4 MB
E. About 8 MB
Total number of pixels =300x8.5x11=28050
Total no. of bits =28050
So total number of bytes =no. of bits/8 =3507 bytes=3.5KB ..therefore option A
Assuming nine-bit two's complement binary representation, convert 1B4 from hexadecimal to
decimal. Remember to check the sign bit:
1B4 (hex) = Blank 1
1 1011 0100
(bin) =
-76
(dec)
1:0001
B:1011
4:0100
1B4:1 1011 0100
So the most significant bit is 1 so the number is negative…so to convert this in decimal we first
have to take the 2’s complement of the number which is 0100 1100
This in decimal is – (1*26+1*23 +1*22)= -(64+8+4)=-76
Assuming nine-bit two's complement representation, convert 94 to binary, show the effect of the
ASL operation on it, then convert the result back to decimal.
94 (dec) =
NZVC =
0 0101 1110
0000
(bin) ASL
0 0101 1110
=
I am not sure about NZVC
94= 0 1011 1100 in binary
0 1011 1100
(bin) =
188
(dec),
Here the most significant bit is zero …
ASL will just add zero to the least significant bit.
number becomes :0 1011 1100
Determine the output of the following Pep/8 machine language program.
The left column in each part is the memory address of the first byte on the line:
0000
0003
0004
0007
000A
000B
000C
C1000C …… this will load value”F0D4” into register 0
18
……this will take NOT (bitwise negate) of the register 0 (R0=0F2B)
F1000B ……this will store the contents of Register 0 at address 000B
51000B ……this will display the content of ‘000B’ ie (0F2B)
00
00
F0D4
The output of this program is 0F2B
A. *
B. /
C. +
D. 1. In the Bible, Exodus Chapter 18 describes how Moses was overwhelmed as the
single judge of Israel because of the large number of trivial cases that were brought
before him. His father-in-law, Jethro, recommended a hierarchical system of
appellate courts where the lowest-level judge had responsibility for 10 citizens. Five
judges of 10 sent the difficult cases that they could not resolve to a judge of 50
citizens. Two judges of 50 were under a judge of 100 and 10 judges of 100 were
under a judge of 1,000. The judges of 1,000 citizens reported to Moses, who had to
decide only the most difficult cases. If the population were exactly 10,000 citizens
(excluding judges), how many judges (including Moses) were needed?
1311
10000/10 +10000/10/5 +100000/10/5/2+100000/10/5/2/10+1 moses
=1000+200+100+10 +1
=1311
1. Suppose you have a 12-bit cell. Find a binary number such that when you add it to
0110 0101 0111, the sum is all 0's. That is, find the missing number in the following
operation. Be sure your answer is in the correct format.
Answer: [x1]
1001 1010 1001
In this you just have to do 2’s complement of the given number
step1: do ones complement :1001 1010 1000
step 2:add 1 to it to get 2’s compliment : 1001 1010 1001
Suppose you need to process a list of 31,000 integers contained in Pep/8 memory at one
integer per word. You estimate that 20% of the instructions in a typical program are unary
instructions. Keep in mind that your applications program must share memory with the
operating system and your data.
Your program can have a maximum of:
Blank 1
Blank 2
272
1088
unary instructions and
nonunary instruction
The Pep/8 memory contains 65,536 bytes
31000 words need 62000 bytes to be stored
which means that instructions have only 3536 bytes left
let unary instruction =x =20% of all
so non unary instruction =4x =80% of all
unary instruction takes 1 byte
non unary instruction takes 3 bytes
so 1*x+3*4x=3536=13x
x=272
4x=1088
For IEEE 754 single precision floating point, what is the number, as written in binary scientific
notation, whose hexadecimal representation is:
question incomplete
For IEEE 754 single precision floating point, write the hexadecimal representation for -1.0.
http://www.h-schmidt.net/FloatConverter/IEEE754.html
http://en.wikipedia.org/wiki/Single-precision_floating-point_format
1 01111111 00000000000000000000000
Download