{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

tutorial4

# tutorial4 - CS 230 Tutorial 4 Jonathan Rodriguez...

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

CS 230 Tutorial 4 January 31, 2011 Jonathan Rodriguez [email protected]

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

View Full Document
CS 230 Tutorial 4 Assignment 1 Sample Solutions Conditional Branches Running high-level code
A1 Sample Solution #4a 35 + 13 = ? 100011 + 1101

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

View Full Document
A1 Sample Solution #4a 35 + 13 = ? 1111 100011 + 1101 110000
A1 Sample Solution #5a 35 * 13 = ? 100011 * 1101

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

View Full Document
A1 Sample Solution #5a 35 * 13 = ? 100011 * 1101 100011 100011 .. + 100011 ...
A1 Sample Solution #5a 35 * 13 = ? 100011 * 1101 100011 100011 .. + 100011 ... 111000111

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

View Full Document
A1 Sample Solution #5b 130 / 23 = ? 10111 ) 10000010
A1 Sample Solution #5b 130 / 23 = ? 1 10111 ) 10000010 - 10111 10011

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

View Full Document
A1 Sample Solution #5b 130 / 23 = ? 10 10111 ) 10000010 - 10111 100110
A1 Sample Solution #5b 130 / 23 = ? 101 10111 ) 10000010 - 10111 100110 - 10111 1111

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

View Full Document
CS 230 Tutorial 4 Assignment 1 Sample Solutions Conditional Branches Running high-level code
Conditional Branches Testing for Equality : beq, bne Program 1: Set \$3 to 1 if \$1 and \$2 are equal bne \$1, \$2, 1 ; skip next instruction if NOT equal. addi \$3, \$0, 1 ; \$1 and \$2 are equal. Load 1 into \$3. jr \$31

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

View Full Document
Conditional Branches Testing for Equality : beq, bne Program 2: Set \$3 to 1 if \$1 is not zero beq \$1, \$0, 1 ; skip next instruction if \$1 IS zero.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 28

tutorial4 - CS 230 Tutorial 4 Jonathan Rodriguez...

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

View Full Document
Ask a homework question - tutors are online