ID: bc190413749: Cs101 Assignment 1
ID: bc190413749: Cs101 Assignment 1
ID: bc190413749
Question 1
1. Determine the contents of register 1 when the machine halts.
Answer 15
2. Write down the bit pattern (in hexadecimal) at memory address F3 when the Halt
instruction is executed.
Answer 0705
2. How many times the machine instruction at address EE is executed before the
machine halts.
Answer 6
3. Determine the contents of register 0 after the instruction at address EC is
executed.
Answer 00
4. Determine the contents of register 2 when the instruction at address F0 is
executed.
Answer 07
Question No 2 (Part A)
22 21 20 2-1 2-2
4 2 1
1 1 1 0 1
1 0 1 0 0 0 0 0 1
00111.0100
10100.0001
11011.0101
Question No 2 (Part B)
Convert the following binary number into ASCII code and then
into its equivalent decimal representation.
01001001010000010100110101011100
Solution
Divide from left in 8 Characters
01001001
01000001
01001101
01011100
27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1
0 1 0 0 1 0 0 1 =73
0 1 0 0 0 0 0 1 =65
0 1 0 0 1 1 0 1 =77
0 1 0 1 1 1 0 0 =92
=73 =I
=65 =A
=77 =M
=92 =\
01001001010000010100110101011100 = IAM/s