CDA3101-Fall2011-Recitation06

# CDA3101-Fall2011-Recitation06 - 0000 00010000 00000111...

This preview shows pages 1–7. Sign up to view the full content.

Multiplication Use Booth's Algorithm to find the product 6x5 in signed binary notation. 6 = 0110 5 = 0101

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Solution: Operation: A Q Q -1 M Count Subtract 0000 0101 0 0110 4 Shift 1010 0101 0 0110 4 Add 1101 0010 1 0110 3 Shift 0011 0010 1 0110 3 Subtract 0001 1001 0 0110 2 Shift 1011 1001 0 0110 2 Add 1101 1100 1 0110 1 Shift 0011 1100 1 0110 1 Done 0001 1110 0 0110 0 Answer: 00011110 = 30
Multiplication Use Booth's Algorithm to find the product -3x9 in signed binary notation. -3 = 11101 9 = 01001 *Why are we using 5 bits now, instead of 4?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Solution Operation: A Q Q -1 M Count Subtract 00000 01001 0 11101 5 Shift 00011 01001 0 11101 5 Add 00001 10100 1 11101 4 Shift 11110 10100 1 11101 4 Shift 11111 01010 0 11101 3 Subtract 11111 10101 0 11101 2 Shift 00010 10101 0 11101 2 Add 00001 01010 1 11101 1 Shift 11110 01010 1 11101 1 Done 11111 00101 0 00000 0 Answer: 1111100101 = -27
Division Divide 7 (00000111) by 2 (0010 0000)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Step Quotient Divisor Remainder Initial value 0000 00100000 00000111 Rem= Rem – Div 0000 00100000 11100111 Rem<0 => +Div 0000 00100000 00000111 Shift Div Right 0000 00010000 00000111 Rem = Rem – Div 0000 00010000 11110111 Rem<0 => +Div
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0000 00010000 00000111 Shift Div Right 0000 00001000 00000111 Rem = Rem – Div 0000 00001000 11111111 Rem<0 => +Div 0000 00001000 00000111 Shift Div Right 0000 00000100 00000111 Rem = Rem-Div 0000 00000100 00000011 Rem>=0; sll Q, Q0 = 1 0001 00000100 00000011 Shift Div Right 0001 00000010 00000011 Rem = Rem – Div 0001 00000010 00000001 Rem>=0; sll Q, Q0 = 1 0011 00000010 00000001 Shift Div right 0011 00000001 00000001 Operation: A Q M Count Shift 0000 0111 0010 4 Subtract 0000 1110 0010 4 Restore 1110 1110 0010 4 Shift 0000 1110 0010 3 Subtract 0001 1100 0010 3 Restore 1111 1100 0010 3 Shift 0001 1100 0010 2 Subtract 0011 1000 0010 2 Insert 1 0001 1000 0010 2 Shift 0001 1001 0010 1 Subtract 0011 0010 0010 1 Insert 1 0001 0010 0010 1 Done 0001 0011 0010 Answer: 0011 = 3 Remainder: 0001 = 1...
View Full Document

{[ snackBarMessage ]}

### Page1 / 7

CDA3101-Fall2011-Recitation06 - 0000 00010000 00000111...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online