ch2 part A - EEL 3801 EEL 3801 Computer Organization...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: EEL 3801 EEL 3801 Computer Organization Computer Organization Spring 2010 Spring 2010 Chapter 2 Chapter 2 Machine Instructions and Machine Instructions and Programs Programs Hamacher et al , Computer Organization Acknowledgment and appreciation for various slide materials from Dr. Philip Wilsey, Dr. Randy Katz, Dr. Philip Leong Numbers, Arithmetic Operations, and Characters s Binary numbers (0, 1) are used in computers as they are easily represented as on/off electrical signals s Consider an n-bit vector B = b n-1 b 1 b 0 or , s This vector can represent unsigned integer values V in the range 0 to 2 n-1, where V(B) = b n-1 2 n-1 ++b 1 2 1 +b 0 2 s MSB= M ost S ignificant B it (leftmost digit in a binary vector) s LSB= L east S ignificant B it (rightmost digit in a binary vector) s Obviously need to represent both positive and negative numbers 1 = i b 1- n i Negative Numbers s Sign-and-magnitude s Most significant bit determines sign, remaining unsigned bits represent magnitude s 1s complement s Most significant bit determines sign. To change sign from unsigned to negative, invert all the bits s 2s complement s Most significant bit determines sign. To change sign from unsigned to negative, invert all the bits and add 1 s This is equivalent to subtracting the positive number from 2 n Addition of Positive Numbers (1-bit) Carry-out 1 1 + 1 1 1 + + 1 1 + 0000 0111 0011 1011 1111 1110 1101 1100 1010 1001 1000 0110 0101 0100 0010 0001 +0 +1 +2 +3 +4 +5 +6 +7 0 1 2 3 4 5 6 7 0 100 = + 4 1 100 = 4 Sign and Magnitude s Assume a 4 bit machine word s One bit dedicate to sign (positive or negative) s sign: 0 = positive (or zero)...
View Full Document

This note was uploaded on 04/02/2010 for the course EEL 3801 taught by Professor Froosh during the Spring '08 term at University of Central Florida.

Page1 / 20

ch2 part A - EEL 3801 EEL 3801 Computer Organization...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online