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.

Slides:



Advertisements
Similar presentations
(CSC 102) Discrete Structures Lecture 5.
Advertisements

Integers. Integer Storage Since Binary consists only of 0s and 1s, we can’t use a negative sign ( - ) for integers. Instead, the Most Significant Bit.
2’s Complement Arithmetic (remember it’s a fixed length system)
Representations Example: Numbers –145 –CVL – –91 –
Kavita Hatwal Fall The decimal system, also called the base 10 number system is based on ten numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. All the numbers.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
Mathematics with Binary. Question  Below is a binary string  Which is the least significant bit (LSB)?  Which is the most significant bit (MSB)? 0.
Assignment 4 Sample problems. Convert the following decimal numbers to binary
Number System and Codes
FIGURES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Number Systems Lecture 02.
COMP201 Computer Systems Number Representation. Number Representation Introduction Number Systems Integer Representations Examples  Englander Chapter.
Binary Number Systems.
3. Representing Integer Data
Chapter3 Fixed Point Representation Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
The Binary Number System
Data Representation Number Systems.
1 Week 3: Data Representation: Negative Numbers READING: Chapter 3.
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Integer Data representation Addition and Multiplication.
ES 244: Digital Logic Design Chapter 1 Chapter 1: Introduction Uchechukwu Ofoegbu Temple University.
Lecture for Week Spring.  Numbers can be represented in many ways. We are familiar with the decimal system since it is most widely used in everyday.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 3): The Fundamentals: Algorithms, the.
Copyright © Cengage Learning. All rights reserved. CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS THE LOGIC OF COMPOUND STATEMENTS.
A-Level Computing Data representation. Objectives Know how data can be represented in a computer system Understand the need for various forms of representation.
Computer Organization and Architecture Computer Arithmetic Chapter 9.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
Representation of data types. Introduction We are going to look at representing cardinal numbers, integers and real numbers in decimal, binary, octal.
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.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
Representation of Data Ma King Man. Reference Text Book: Volume 2 Notes: Chapter 19.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Engineering 1040: Mechanisms & Electric Circuits Spring 2014 Number Systems.
6 October 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
CSC 221 Computer Organization and Assembly Language
Positional Number Systems
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Topic 1 – Number Systems. What is a Number System? A number system consists of an ordered set of symbols (digits) with relations defined for addition,
Operations on Bits Arithmetic Operations Logic Operations
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
Number Systems and Logic Prepared by Dr P Marais (Modified by D Burford)
By Jariya Phongsai A two's-complement system is a system in which negative numbers are represented by the two's complement of the absolute value; this.
Fixed & Floating Number Format Dr. Hugh Blanton ENTC 4337/5337.
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.
Module 2.  In Module 1, we have learned basic number representation which include binary, octal, hexadecimal and decimal.  In digital systems, numbers.
NUMBER SYSTEMS.
IT1004: Data Representation and Organization Negative number representation.
Chapter 1 Number Systems Digital Electronics. Topics discussed in last lecture Digital systems Advantages of using digital signals over analog. Disadvantages.
©2010 Cengage Learning SLIDES FOR CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION Click the mouse to move to the next page. Use the ESC key to exit.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Computer Organization 1 Data Representation Negative Integers.
Lecture 2: 8/29/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Software Design and Development Storing Data Computing Science.
Fundamentals of Computer Science
Unit 1 Introduction Number Systems and Conversion.
Addition and Subtraction
A brief comparison of integer and double representation
Integer Real Numbers Character Boolean Memory Address CPU Data Types
CSE 102 Introduction to Computer Engineering
Number Systems Base 2, 10, 16.
Data Representation in Computer Systems
Binary / Hex Binary and Hex The number systems of Computer Science.
Chapter 2: Number Systems
CMSC250 Fall 2018 Circuits 1 1.
Copyright © Cengage Learning. All rights reserved.
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

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 if you are all thumbs. – Glaser and Way

2.5 Application: Number Systems and Circuits for Addition 2 Decimal notation (base 10) expresses a number as a string of digits in which each digit’s position indicates the power of 10 by which it is multiplied. For example:

Decimal notation is based on the fact that any positive integer can be written uniquely as a sum of products of the form where n is a nonnegative integer and each d is one of the decimal digits 0, 1, 2, 3, 4, 5, 6, 7, 8, or Application: Number Systems and Circuits for Addition 3

In computer science, base 2 notation, or binary notation, is of special importance because the signals used in modern electronics are always in one of only two states. Any integer can be represented uniquely as a sum of products of the form where each n is an integer and each d is one of the binary digits 0 or Application: Number Systems and Circuits for Addition 4

Represent the decimal integers in binary notation Application: Number Systems and Circuits for Addition 5

Represent the integers in decimal notation. 2.5 Application: Number Systems and Circuits for Addition 6

Addition in binary notation is similar to addition in decimal notation, except that only 0's and 1's can be used, instead of the whole spectrum of 0-9. This actually makes binary addition much simpler than decimal addition, as we only need to remember the following: = = = = Application: Number Systems and Circuits for Addition 7

Application: Number Systems and Circuits for Addition 8

Binary subtraction is simplified as well, as long as we remember how subtraction and the base 2 number system. Let's look at two examples Application: Number Systems and Circuits for Addition 9

Given a positive integer a, the two’s compliment of a relative to a fixed bit length n is the n-bit binary representation of 2.5 Application: Number Systems and Circuits for Addition 10

To find the 8-bit two’s complement of a positive integer a that is at most 255: – Write the 8-bit binary representation for a. – Flip the bits (switch all the 1’s to 0’s and 0’s to 1’s). – Add 1 in binary notation. 2.5 Application: Number Systems and Circuits for Addition 11

Find the 8-bit two’s compliment for the integer below Application: Number Systems and Circuits for Addition 12

Base 16 notation, or hexadecimal notation can be represented uniquely as a sum of products of the form where each n is an integer and each d is one of the integers 0 to through 15 are represented by A, B, C, D, E and F. 2.5 Application: Number Systems and Circuits for Addition 13

Convert the integer from hexadecimal to decimal notation. E0D Application: Number Systems and Circuits for Addition 14

Convert the integer from hexadecimal to binary notation. B53DF Application: Number Systems and Circuits for Addition 15

Convert the integer from binary to hexadecimal notation Application: Number Systems and Circuits for Addition 16