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.

Slides:



Advertisements
Similar presentations
Intro to CS – Honors I Representing Numbers GEORGIOS PORTOKALIDIS
Advertisements

Lab 10 : Arithmetic Systems : Adder System Layout: Slide #2 Slide #3 Slide #4 Slide #5 Arithmetic Overflow: 2’s Complement Conversions: 8 Bit Adder/Subtractor.
2’s Complement Arithmetic (remember it’s a fixed length system)
EMB1006 The Binary System There is no 2 Jonathan-Lee Jones.
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Chapter 1.7 Storing Fractions. Excess Notation, continued… In this notation, "m" indicates the total number of bits. For us (working with 8 bits), it.
CSCI 3 Chapter 1 Data Storage. Bits  Today’s computer information is encoded as patterns of 0s and 1s.  These digits are called “bits” (binary digits)
Chapter 1.5 The Binary System CSCI 3. Basic Concepts Behind the Binary System In the decimal system, things are organized into columns – H | T | O – 1.
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
Signed Numbers CS208. Signed Numbers Until now we've been concentrating on unsigned numbers. In real life we also need to be able represent signed numbers.
Computer ArchitectureFall 2007 © August 29, 2007 Karem Sakallah CS 447 – Computer Architecture.
Computer Organization and Architecture Tutorial 5 Kenneth Lee.
Data Representation – Chapter 3 Sections 3-2, 3-3, 3-4.
COMP201 Computer Systems Number Representation. Number Representation Introduction Number Systems Integer Representations Examples  Englander Chapter.
Operations on data CHAPTER 4.
Topic 4 Computer Mathematics and Logic
1 Week 3: Data Representation: Negative Numbers READING: Chapter 3.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
Conversion Between Lengths Positive number pack with leading zeros +18 = = Negative numbers pack with leading ones -18 =
Number Systems Part 2 Numerical Overflow Right and Left Shifts Storage Methods Subtraction Ranges.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
Chapter 1 Data Storage(3) Yonsei University 1 st Semester, 2015 Sanghyun Park.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
CH09 Computer Arithmetic  CPU combines of ALU and Control Unit, this chapter discusses ALU The Arithmetic and Logic Unit (ALU) Number Systems Integer.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
Calculating Two’s Complement. The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Computer Arithmetic and the Arithmetic Unit Lesson 2 - Ioan Despi.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
The Teacher CP4 Binary and all that… CP4 Revision.
6 October 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
Cosc 2150: Computer Organization Chapter 2 Part 1 Integers addition and subtraction.
Number Representation
ECEN 248 Lab 4: Multiplexer Based Arithmetic Logic Unit
CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -
THE BINARY SYSTEM.
Addition and Substraction
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Digital Representations ME 4611 Binary Representation Only two states (0 and 1) Easy to implement electronically %0= (0) 10 %1= (1) 10 %10= (2) 10 %11=
Outline Binary Addition 2’s complement Binary Subtraction Half Adder
Computer Information Technology. I need you to submit your project electronically to the Hancock website. Before you can submit your project you will.
NUMBER SYSTEMS.
Integers’ Representation. Binary Addition. Two's Complement. Unsigned number representation Binary Addition, Subtraction. Overflow of unsigned numbers.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
MicroProcessors Lec. 4 Dr. Tamer Samy Gaafar. Course Web Page —
Computer Organization 1 Data Representation Negative Integers.
Representing Sound and Image. Representing images One mean of representing an image it to interpret the image as a collection of dots, each is called.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
1 Integer Representations V1.0 (22/10/2005). 2 Integer Representations  Unsigned integer  Signed integer  Sign and magnitude  Complements  One’s.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
Binary Arithmetic James A. Rome Tennessee Governor's Academy August 2010.
Department of Computer Science Georgia State University
Cosc 2150: Computer Organization
Chapter 1 Data Storage.
Data Representation – Chapter 3
1.6) Storing Integer:.
CPS120: Introduction to Computer Science
OBJECTIVES After reading this chapter, the reader should be able to :
1.6) Storing Integer: 1.7) storing fraction:
Presentation transcript:

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 bring or 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 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.

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

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.

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

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

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

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.

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.

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

Two’s Complement Notation

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.”

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 and 1001 i.e and 1001

Two’s Complement Notation

Addition in Two’s Complement Notation

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