Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Assignment No.

Question No 1

1. Determine the contents of register 1 when the machine halts.


Answer: When the register is 1, the contents in the register are 15.

2. Write down the bit pattern (in hexadecimal) at memory address F3 when the
Halt instruction is executed.
Answer: Bit pattern at memory address F3 is 0705.
3. How many times the machine instruction at address EE is executed before the
machine halts.
Answer: At address EE, the machine instruction is executed 7 times.

4. Determine the contents of register 0 after the instruction at address EC is


executed.
Answer: After the instruction at address EC, the contents of the register 0 is 00 at the
address F1.
5. Determine the contents of register 2 when the instruction at address F0 is
executed.
Answer: The contents of register 2 when the instruction at address F0 is executed is 07
at address F2.
==================================================================
Question No 2

a. Perform binary addition on given numbers:

20(1/16) and 7(1/4).

Answer:

24 23 22 21 20 . 2-1 2-2 2-3 2-4


16 8 4 2 1 . 1/2 1/4 1/8 1/16

1 01 1 0 0 . 0 0 0 1 20 (1/6)
0 0 1 1 1 . 0 1 0 0 7 (1/4)

1 1 0 1 1 0 1 0 1 27 (5/16)

b. Convert the following binary number into ASCII code and then into its equivalent decimal
representation.

01001001010000010100110101011100

Answer: Consulting the appendix A of the book, following table is made which answers
the question.

B.N 0100 1001 0100 0001 0100 1101 0101 1100


H.D 4 9 4 1 4 D 5 C
ASCI I A M \
Decimal 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20
73 65 77 92

You might also like