{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

tutorial2 - CS 230 Tutorial 2 Binary Numbers and Arithmetic...

Info iconThis preview shows pages 1–31. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 230 Tutorial 2 January 17, 2011 Jonathan Rodriguez [email protected] Binary Numbers and Arithmetic
Background image of page 1

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

View Full Document Right Arrow Icon
CS 230 Tutorial 2 2's Complement Numbers Examples of Binary Arithmetic Miscellaneous Items Word size, Execution speed
Background image of page 2
2's Complement 8-bit binary 00000000 00000001 00000010 00000011 00000100 00000101 decimal 0 1 2 3 4 5
Background image of page 3

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

View Full Document Right Arrow Icon
2's Complement 8-bit binary 01111010 01111011 01111100 01111101 01111110 01111111 decimal 122 123 124 125 126 127 Sign bit
Background image of page 4
2's Complement 8-bit binary 01111111 10000000 decimal 127 -128 Sign bit (1 means it's negative!)
Background image of page 5

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

View Full Document Right Arrow Icon
2's Complement 8-bit binary 11111110 11111111 00000000 00000001 00000010 decimal -2 -1 0 1 2 -X = ~X + 1 Definition of 2's Complement: Complement (flip all bits)
Background image of page 6
Addition (ex 1) 00010011 + 00000001 19 + 1
Background image of page 7

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

View Full Document Right Arrow Icon
Addition (ex 1) 00010011 + 00000001 1 19 + 1 0 Carry
Background image of page 8
Addition (ex 1) 00010011 + 00000001 1 19 + 1 20 Carry
Background image of page 9

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

View Full Document Right Arrow Icon
Addition (ex 1) 1 00010011 + 00000001 0 1 19 + 1 20
Background image of page 10
Addition 11 00010011 + 00000001 00 1 19 + 1 20
Background image of page 11

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

View Full Document Right Arrow Icon
Addition (ex 1) 11 00010011 + 00000001 100 1 19 + 1 20
Background image of page 12
Addition (ex 1) 11 00010011 + 00000001 0100 1 19 + 1 20
Background image of page 13

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

View Full Document Right Arrow Icon
Addition (ex 1) 11 00010011 + 00000001 10100 1 19 + 1 20
Background image of page 14
Addition (ex 1) 11 00010011 + 00000001 00010100 1 19 + 1 20
Background image of page 15

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

View Full Document Right Arrow Icon
Addition (ex 2) 01011101 + 00010011 93 + 19
Background image of page 16
Addition (ex 2) 1 01011101 + 00010011 0 93 + 19
Background image of page 17

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

View Full Document Right Arrow Icon
Addition (ex 2) 11 01011101 + 00010011 00 93 + 19
Background image of page 18
Addition (ex 2) 111 01011101 + 00010011 000 93 + 19
Background image of page 19

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

View Full Document Right Arrow Icon
Addition (ex 2) 1111 01011101 + 00010011 0000 93 + 19
Background image of page 20
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}