Given that 74 is divided by 21. Convert both the values to binary.
Rewrite them in 3 bits order:
Division table is as follows:
Step | Action | Quotient | Divisor | Remainder |
0 | Initial values | 000 000 | 010 001 000 000 | 000 000 111 100 |
1 | remainder=remainder-Divisor | 000 000 | 010 001 000 000 | 101 111 111 100 |
Remainder<0,R+D,Q left shift | 000 000 | 010 001 000 000 | 000 000 111 100 |
Rshift Div | 000 000 | 001 000 100 000 | 000 000 111 100 |
2 | remainder=remainder-Divisor | 000 000 | 001 000 100 000 | 111 000 011 100 |
Remainder<0,R+D,Q left shift | 000 000 | 001 000 100 000 | 000 000 111 100 |
Rshift Div | 000 000 | 000 100 010 000 | 000 000 111 100 |
3 | remainder=remainder-Divisor | 000 000 | 000 100 010 000 | 111 100 101 100 |
Remainder<0,R+D,Q left shift | 000 000 | 000 100 010 000 | 000 000 111 100 |
Rshift Div | 000 000 | 000 010 001 000 | 000 000 111 100 |
4 | remainder=remainder-Divisor | 000 000 | 000 010 001 000 | 111 110 110 100 |
Remainder<0,R+D,Q left shift | 000 000 | 000 010 001 000 | 000 000 111 100 |
Rshift Div | 000 000 | 000 001 000 100 | 000 000 111 100 |
5 | remainder=remainder-Divisor | 000 000 | 000 001 000 100 | 111 111 111 000 |
Remainder<0,R+D,Q left shift | 000 000 | 000 001 000 100 | 000 000 111 100 |
Rshift Div | 000 000 | 000 000 100 010 | 000 000 111 100 |
6 | remainder=remainder-Divisor | 000 000 | 000 000 100 010 | 000 000 011 010 |
Remainder>0,R+D,Q Lshift 1 | 000 001 | 000 000 100 010 | 000 000 011 010 |
Rshift Div | 000 001 | 000 000 010 001 | 000 000 011 010 |
7 | remainder=remainder-Divisor | 000 001 | 000 000 010 001 | 000 000 001 001 |
Remainder>0,R+D,Q Lshift 1 | 000 011 | 000 000 010 001 | 000 000 001 001 |
Rshift Div | 000 011 | 000 000 001 000 | 000 000 001 001 |
Now, convert the binary values to decimals:
Therefore, the quotient and remainder of the 74 divided by 21 is 3 and 9 respectively.