Question:
Using a table similar to that shown in Figure 3.10, calculate 74 divided by 21 using the hardware described in Figure 3.11. You should show the contents of each register on each step. Assume A and B are unsigned 6-bit integers. Th is algorithm requires a slightly different approach than that shown in Figure 3.9. You will want to think hard about this, do an experiment or two, or else go to the web to figure out how to make this work correctly.
Figure 3.10
Figure 3.11
Transcribed Image Text:
Iteration Step Quotient Divisor Remainder Initial values 0000 0010 0000 0000 0111 0110 0111 1: Rem = Rem – Div 0000 0010 0000 2b: Rem < 0 = +Div, sll Q, QO = 0 0000 0010 0000 0000 0111 3: Shift Div right 0000 0001 0000 0000 0111 0111 0111 1: Rem = Rem – Div 0000 0001 0000 0000 2b: Rem < 0 +Div, sll Q, QO = 0 0001 0000 0000 0111 2 3: Shift Div right 0000 1000 0000 0000 0111 0111 1111 0000 1: Rem = Rem – Div 0000 1000 2b: Rem < 0 = +Div, sll Q, QO = 0 0000 0000 1000 0000 0111 3 3: Shift Div right 0000 0000 0100 0000 0111 Qo00 0011 1: Rem = Rem – Div 0000 0000 0100 2a: Rem 20 = sll Q, Q0 = 1 0000 0100 0001 0000 0011 4 3: Shift Div right 0001 0000 0010 0000 0011 Oo00 0001 1: Rem = Rem – Div 0001 0000 0010 2a: Rem 20= sll Q, QO = 1 3: Shift Div right 0011 0000 0010 0000 0001 0011 0000 0001 0000 0001 Divisor 32 bits 32-bit ALU Shift right Shift Teft Write Control Remainder test 64 bits