You are asked to write a microprogram similar to the one sho

You are asked to write a microprogram (similar to the one shown on the micro-architecture handout) to realize multiplying two 7-bit binary numbers (assume they are positive numbers) that are already stored in register A and B, and store the results in registers C and D. You are limited to the capability of the micro-architecture handout (assume 8-bit machine, all registers, and ALU being 8-bit, and shifter DOES NOT have left_out or right_out).

Your commented multiplication microprogram must be typed, and followed by the following two input examples (for A and B) and the multiplication results (C and D).

A := 1101011    B := 1000001

A := 1010101 B := 1001100

At each step(line) of your micro-code, the values of the all the registers that you have used must be clearly presented.

You are can use any of the 16 provided registers in the micro-architecture handout (if needed).

Please explain each process and what each step does.

Solution

LXI H, 2400 ; memory pointer initializing
MOV E, M ; multiplicand
MVI D, 00H
INX H ; memory pointer incrementing by 1
MOV A, M ; reading multiplier value
LXI H, 0000 ; Initializing result as 0
MVI B, 07H ; total bits 7
MULT: DAD H ; performing multiplication
RAL
JNC SKIP ; if carry found then jump
DAD D ; storing sum of both product and multiplicand
SKIP: DCR B ; until counter is zero..
JNZ MULT
SHLD 2500H ; Storing result
HLT ; Exit

You are asked to write a microprogram (similar to the one shown on the micro-architecture handout) to realize multiplying two 7-bit binary numbers (assume they

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site