# lecture_02 - ECE 190 Lecture 02 Bits and Operations on Bits...

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

ECE 190 Lecture 02 August 25, 2011 1 V. Kindratenko Bits and Operations on Bits Lecture Topics Unsigned and signed integer representations Conversion between binary and decimal representations Arithmetic and logical operations on binary numbers Floating-point data representation Other representations Lecture materials Textbook Chapter 2 Homework/Projects HW1 posted on the course website (http://courses.engr.illinois.edu/ece190/) HW1 due Wednesday August 31 at 5pm in the ECE190 drop box located in the basement of Everitt Lab Announcements AD9 (11am) discussion section moved from DCL 440 to DCL 520 Getting credit in James Scholar Honors Program o Prof. Steve Lumetta will be administering James Scholar work this semester. o The work will involve programming a mobile platform (smartphone) o If interested, contact Prof. Lumetta directly Class Committee Class committee will be setup to serve as a communication channel between the students taking ECE 190 and the teaching staff. Class committee meets with the teaching staff every other week. o Meeting schedule TBD If you have any questions or concerns that you would like the class committee to discuss during the upcoming meeting, please send them either to one of the instructors to one of the class committee members. If you would like to serve on the Class Committee, please email Prof. Kindratenko

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

View Full Document
ECE 190 Lecture 02 August 25, 2011 2 V. Kindratenko Unsigned and signed integer representations So far we defined a way to write positive (unsigned) integer numbers using 0 and 1 bits, but how about writing negative numbers? Signed-magnitude We can use half of the distinct patterns made of k bits to represent positive values and the other half to represent negative values o Example: with 3 bits we can represent integer numbers from -3 to +3; this leaves us with one 3-bit code not assigned o We still need to decide what distinct patterns we should use for representing positive numbers vs. negative numbers o One way, called signed-magnitude , is to use the leading digit to indicate if the number is positive or negative Positive numbers will have 0 as the leading digit Negative numbers will have 1 as the leading digit Binary notation Signed magnitude 000 0 001 1 010 2 011 3 100 -0 101 -1 110 -2 111 -3 The largest positive number is this example is 011 2 =3 10 The smallest negative number in this notation is 111 2 =-3 10 We still are not using one representation efficiently: 100 2 1’s complement Another way to represent both positive and negative integers, called 1’s complement , is based on the idea that all negative numbers can be represented by flipping digits in the positive numbers o Example: 010 2 =2 10 . 101 2 =-2 10 o In this case, we still are not using one representation efficiently: 111 2 o This representation was actually used in some early computers, e.g., CDC 6600 Binary notation Signed magnitude 1’s complement 000 0 0 001 1 1 010 2 2 011 3 3 100 -0 -3 101 -1 -2 110 -2 -1 111 -3 -0
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 12

lecture_02 - ECE 190 Lecture 02 Bits and Operations on Bits...

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

View Full Document
Ask a homework question - tutors are online