Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 3 CH 1.6. REMINDER Remember to put your Student ID # on your homework Remember to put your Student ID # on your homework If you are not going to.

Similar presentations


Presentation on theme: "CSCI 3 CH 1.6. REMINDER Remember to put your Student ID # on your homework Remember to put your Student ID # on your homework If you are not going to."— Presentation transcript:

1 CSCI 3 CH 1.6

2 REMINDER Remember to put your Student ID # on your homework Remember to put your Student ID # on your homework If you are not going to bring or email the homework to me, please submit a hard copy by the end of the Lab Class. I will put the list of students who have turned in the homework on the website. If you are not going to bring or email the homework to me, please submit a hard copy by the end of the Lab Class. I will put the list of students who have turned in the homework on the website.

3 Reminder Lab Project #1’s due Feb 8,07. Lab Project #1’s due Feb 8,07. Please email it to me with the subject line: Please email it to me with the subject line: CSCI3: “your name” “your student ID#” CSCI3: “your name” “your student ID#” My email address is: My email address is: intro.csci3@gmail.com intro.csci3@gmail.com

4 Homework #3 Question #1, 2, and 3 on page 51 Question #1, 2, and 3 on page 51 Due Day 9th of class. Due Day 9th of class. I want a hard copy of this homework. I want a hard copy of this homework. Please do write down your name and student number on the paper. Please do write down your name and student number on the paper. Show your work please. Do not just put down the answer. Show your work please. Do not just put down the answer.

5 Review Boolean Operations Boolean Operations AND AND OR OR XOR XOR NOT NOT

6 REVIEW Gates Gates AND Gate AND Gate OR Gate OR Gate XOR Gate XOR Gate NOT Gate NOT Gate Circuits Circuits

7 REVIEW Binary System Binary System Converting from Bin to Dec Converting from Bin to Dec Converting from Dec to Bin Converting from Dec to Bin Binary Addition Binary Addition

8 Chapter 1.6 Storing Integers Two’s Complement Notation Two’s Complement Notation The most popular system for representing integers within today’s computers is two’s complement notation. The most popular system for representing integers within today’s computers is two’s complement notation. It uses a fixed number of bits to represent each of the values in the system. It uses a fixed number of bits to represent each of the values in the system.

9 Two’s complement notation The patterns representing negative values are obtained by starting with a string of 1s of the appropriate length and then counting backward in binary until the pattern consisting of a 1 followed by 0s is reached. The patterns representing negative values are obtained by starting with a string of 1s of the appropriate length and then counting backward in binary until the pattern consisting of a 1 followed by 0s is reached.

10 Two’s Complement Notation Fig 1.21 on page 47 shows two complete two’s complement systems Fig 1.21 on page 47 shows two complete two’s complement systems

11 Two’s Complement Notation

12 Note that in a two’s complement system, the leftmost bit of a bit pattern indicates the sign of the value represented. Note that in a two’s complement system, the leftmost bit of a bit pattern indicates the sign of the value represented. Thus, the leftmost bit is often called the “sign bit.” Thus, the leftmost bit is often called the “sign bit.”

13 Two’s Complement Notation How to get the negative values How to get the negative values Complement of a pattern is the pattern obtained by changing all the 0s to 1s and all the 1s to 0s. Complement of a pattern is the pattern obtained by changing all the 0s to 1s and all the 1s to 0s. i.e. 0110 and 1001 i.e. 0110 and 1001

14 Two’s Complement Notation

15 Addition in Two’s Complement Notation

16 The Problem of Overflow Example: Example: Using patterns of length four Using patterns of length four 5+4 5+4 Suppose to be 9 Suppose to be 9 The answer is -7 The answer is -7


Download ppt "CSCI 3 CH 1.6. REMINDER Remember to put your Student ID # on your homework Remember to put your Student ID # on your homework If you are not going to."

Similar presentations


Ads by Google