Create New Coal Id
Create New Coal Id
NAME: _____________________________________
SECTION: _________
Consider last four digits of your ID and ADD 5555H to all digits and create your new COAL ID in HEX as
shown in example below
Example ID
1 2 8 9
+ Added Value
5 5 5 5
Example COAL ID
6 7 D E
0110 0111 1101 1110
Your ID
Added Value
5 5 5 5
COAL NEW ID
Binary
MS-BCD LS-BCD
ASSIGNMENT 4 (EE-204)
1. Consider the following code and fill given registers and memory accordingly?
NOTE: Multiplicand is last digit of your NEW COAL ID to it whereas Multiplier is second last digital of your
New COAL ID?
al bl
CF multiplicand Multiplier CF result
Page 2 of 27
ASSIGNMENT 4 (EE-204)
2. Consider the following code and fill given registers and memory accordingly?
NOTE: Where Multiplicand is your NEW ID whereas Multiplier is given in declaration.
Page 3 of 27
ASSIGNMENT 4 (EE-204)
Page 4 of 27
ASSIGNMENT 4 (EE-204)
Page 5 of 27
ASSIGNMENT 4 (EE-204)
Page 6 of 27
ASSIGNMENT 4 (EE-204)
Page 7 of 27
ASSIGNMENT 4 (EE-204)
5. Write code in assembly language to implement the above mentioned flow chart. (Attach sheet for
code here).
Page 8 of 27
ASSIGNMENT 4 (EE-204)
Page 9 of 27
ASSIGNMENT 4 (EE-204)
7. Write code in assembly language to implement the above mentioned flow chart. (Attach sheet for
code here).
Page 10 of 27
ASSIGNMENT 4 (EE-204)
9. Write code in assembly language to implement the above mentioned flow chart. (Attach sheet for
code here).
Page 11 of 27
ASSIGNMENT 4 (EE-204)
Page 12 of 27
ASSIGNMENT 4 (EE-204)
11. Save your NEW ID in BX register and calculate number of one’s in your ID
Page 13 of 27
ASSIGNMENT 4 (EE-204)
13. Write a program that take 4 digits of your NEW ID and save them in separate memory
location of size byte?
NOTE: Supposed to use rotate and shift instructions
Page 14 of 27
ASSIGNMENT 4 (EE-204)
PC = Program counter
IR = Instruction register
MAR = Memory address register
MBR = Memory buffer register
I/O AR = Input/output address register
I/O BR = Input/output buffer register
Instruction Format:
16-bit instructions
Bits 0-3 is Operation Code (Op Code)
Bits 4-15 is Address
Page 15 of 27
ASSIGNMENT 4 (EE-204)
Page 16 of 27
ASSIGNMENT 4 (EE-204)
Page 17 of 27
ASSIGNMENT 4 (EE-204)
Page 18 of 27
ASSIGNMENT 4 (EE-204)
Page 19 of 27
ASSIGNMENT 4 (EE-204)
PC = Program counter
IR = Instruction register
MAR = Memory address register
MBR = Memory buffer register
I/O AR = Input/output address register
I/O BR = Input/output buffer register
Instruction Format:
16-bit instructions
Bits 0-3 is Operation Code (Op Code)
Bits 4-15 is Address
Page 20 of 27
ASSIGNMENT 4 (EE-204)
Page 21 of 27
ASSIGNMENT 4 (EE-204)
Page 22 of 27
ASSIGNMENT 4 (EE-204)
Page 23 of 27
ASSIGNMENT 4 (EE-204)
PC = Program counter
IR = Instruction register
MAR = Memory address register
MBR = Memory buffer register
I/O AR = Input/output address register
I/O BR = Input/output buffer register
Instruction Format:
16-bit instructions
Bits 0-3 is Operation Code (Op Code)
Bits 4-15 is Address
Page 24 of 27
ASSIGNMENT 4 (EE-204)
Page 25 of 27
ASSIGNMENT 4 (EE-204)
Page 26 of 27
ASSIGNMENT 4 (EE-204)
Page 27 of 27