CSE 12 Lecture Notes - Lecture 8: Signed Number Representations, Additive Inverse

34 views3 pages
Verified Note
29 Apr 2019
School
Course
Professor

Document Summary

Data in a computer is just high and low voltages. high voltage = 1 low voltage = 0. We interpret this data based on its encoding. Computers encode all sorts of data: numbers integers unsigned signed signed magnitude, two"s complement, bias notation fraction fixed point floating point. These are interpreted as unsigned numbers (positive). n = # of bits. The most significant bit is the sign bit: 0 = positive, 1 = negative. Other bits are treated as a magnitude n = # of bits. Range: -(2^(n-1) - 1) -> 2^(n-1) - 1. How many distinct values can we represent? minimum: 1111 -> -8 maximum: 0111 -> 7. Two"s complement is how modern computers store signed integers. The most significant bit is the signed bit: 0 = positive, 1 = negative. Positive #s are encoded the same as unsigned with the exception that you have one less bit (msb). n = # bits.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents