0% found this document useful (0 votes)
25 views2 pages

Data Manipulation Homework 4 Guide

Uploaded by

Đức Trần
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)
25 views2 pages

Data Manipulation Homework 4 Guide

Uploaded by

Đức Trần
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

Homework 4: Data Manipulation

The following 3 questions using the simple machine language mention in


slides
1. Explain instruction in English
a. 368A b. BADE c. 803C d. 40F4
2. Suppose the memory cells from addresses B0 to B8 contain the
(hexadecimal) bit patterns given in the following table?
Address Contents
B0 13
B1 B8
B2 A3
B3 02
B4 33
B5 B8
B6 C0
B7 00
B8 0F

a. If the program counter starts at B0, what bit pattern is in register


number 3 after the first instruction has been executed?
b. What bit pattern is in memory cell B8 when the halt instruction is
executed?

3. Translate the following instructions from English into the machine language
a. LOAD register 6 with the hexadecimal value 77.
b. LOAD register 7 with the contents of memory cell 77.
c. JUMP to the instruction at memory location 24 if the contents of register 0
equals the value in register A.
d. ROTATE register 4 three bits to the right.
e. AND the contents of registers E and 2 leaving the result in register 1

4. Suppose the memory cells from addresses 00 to 0D contain the (hexadecimal)


bit patterns given in the following table?
Address Contents
00 20
01 04
02 21
03 01
04 40
05 12
06 51
07 12
08 B1
09 0C
0A B0
0B 06
0C C0
0D 00

Assume that the machine starts with its program counter containing 00.

a. What bit pattern will be in register 0 when the machine halts?


b. What bit pattern will be in register 1 when the machine halts?
c. What bit pattern is in the program counter when the machine halts?
5. Using the machine language in the slides, write a program that places a 1 in
the most significant bit of the memory cell whose address is A7 without
modifying the remaining bits in the cell.
6. Using the machine language in the slides, write a program that copies the
middle four bits from memory cell E0 into the least significant four bits of
memory cell E1, while placing 0s in the most significant four bits of the cell at
location E1.

You might also like