Number Systems Part 2. Counting in Binary DecimalBinary 00 11 210 311 4100 5101 6110 7111 81000 91001 101010 111011 121100 131101 141110 151111 1610000.

Slides:



Advertisements
Similar presentations
Data Representation. Units & Prefixes Review kilo, mega, and giga are different in binary! bit (b) – binary digit Byte (B) – 8 binary digits KiloByte.
Advertisements

Representing Numbers: Integers
DATA REPRESENTATION CONVERSION.
Radix Conversion Given a value X represented in source system with radix  s, represent the same number in a destination system with radix  d Consider.
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Binary Representation Introduction to Computer Science and Programming I Chris Schmidt.
Number Systems Decimal (Base 10) Binary (Base 2) Hexadecimal (Base 16)
Number Representation Rizwan Rehman, CCS, DU. Convert a number from decimal to binary notation and vice versa. Understand the different representations.
Two’s Complement 1.As an action: (Assume the starting value is 1011) 1.Flip the bits from the starting value => Add one to get the answer.
Review Binary Basic Conversion Binary Decimal
IT-101 Section 001 Lecture #4 Introduction to Information Technology.
Computer Systems 1 Fundamentals of Computing
Codes and number systems Introduction to Computer Yung-Yu Chuang with slides by Nisan & Schocken ( ) and Harris & Harris (DDCA)
Number Representations and Computer Arithmetic. CS 21a 9/23/02 Odds and Ends Slide 2 © Luis F. G. Sarmenta and John Paul Vergara, Ateneo de Manila University.
Lecture 1. Number Systems Prof. Taeweon Suh Computer Science Education Korea University ECM585 Special Topics in Computer Design.
Computer System & Binary Review. Memory Model What memory is supposed to look like.
NUMBER REPRESENTATION CHAPTER 3 – part 3. ONE’S COMPLEMENT REPRESENTATION CHAPTER 3 – part 3.
CS Binary Representation of Information Detecting Voltage Levels Why not 10 levels? Would be unreliable Not enough difference between states On/Off.
Data Representation A series of eight bits is called a byte. A byte can be used to represent a number or a character. As you’ll see in the following table,
Bits & Bytes Created by Chris McAbee For AAMU AGB199 Extra Credit Created from information copied and pasted from
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Chapter 3 Number Representation. Convert a number from decimal to binary notation and vice versa. Understand the different representations of an integer.
The Teacher CP4 Binary and all that… CP4 Revision.
Number Representation
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Computer Systems Nat 4/5 Computing Science Data Representation Lesson 2: Floating Point Representation.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Computer Data Formats Industrial Informatics, Production and Logistics by Wolfgang Neff.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
Data Representation Bits, Bytes, Binary, Hexadecimal.
Networking for Home and Small Businesses –.  Explain the binary representation of data.
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
How We Measure Memory. At the Bottom of things A piece of digital information is always stored as a sequence of binary states. What’s that mean you ask???
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=
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
2.1.4 Data Representation Units.
CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
In decimal we are quite familiar with placing a “-” sign in front of a number to denote that it is negative The same is true for binary numbers a computer.
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.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Understanding Computers
Binary Numbers. Base 10 and Base 2  We normally work with numbers in base 10.  In base 10 we use the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.  Everything.
© 2016 AQA. Created by Teachit for AQA Number bases and Units of information Lesson.
Binary & Hex Review.
© 2003, Cisco Systems, Inc. All rights reserved.
Memory Parts of a computer
COMP211 Computer Logic Design Lecture 1. Number Systems
Unit 2.6 Data Representation Lesson 1 ‒ Numbers
CSE 102 Introduction to Computer Engineering
Data Representation Numbers
Number Representation
Number Systems.
Chapter Four Data Representation in Computers By Bezawit E.
Storage.
LO1 – Understand Computer Hardware
Binary & Hex Review.
Computer Systems Nat 4/5 Computing Science Data Representation
OBJECTIVES After reading this chapter, the reader should be able to :
Presentation transcript:

Number Systems Part 2

Counting in Binary DecimalBinary When the symbols for the first digit are exhausted, the next- higher digit (to the left) is incremented, and counting starts over at 0.

Byte The byte is a unit of digital information in computing and telecommunications. It is an ordered collection of bits, in which each bit denotes the binary value of 1 or 0. A byte is composed of 8 bits.

Byte Prefixes When you start talking about lots of bytes, you get into prefixes like kilo, mega and giga, as in kilobyte, megabyte and gigabyte (also shortened to K, M and G, as in Kbytes, Mbytes and Gbytes or KB, MB and GB). The following table shows the binary multipliers:

Summary of Conversions DecimalBinaryOctalHexadecimal DecimalRepeatedly Divide By 2 Repeatedly Divide By 8 Repeatedly Divide By 16 BinaryMultiply digits by Powers of 2 Group bits into sets of 3 Group bits into sets of 4 OctalMultiply digits by Powers of 8 Represent digits in groups of 3 bits Convert to Binary, Convert to Hex HexadecimalMultiply digits by Powers of 16 Represent digits in groups of 4 bits Convert to Binary, Convert to Oct

Number of Bits and No. of possible values Largest Number represented in 8 bits: = =255

Number of Bits, No. of possible values and Range Number of possible values = 2 N Range: 0 to 2 N -1(2 8 =256) = 0 to 255

Signed Integer Representation Sign and Magnitude One’s Complement Two’s Complement

Sign and Magnitude Requires one bit to represent sign – 0 for positive – 1 for negative In 8 bit allocation you can only use 7 bits to represent absolute value of a number Range: - (2 N -1) to + (2 N -1) = -127 to +127

Example Store -258 in a 16 bit memory location using sign-and-magnitude representation Solution: – First change the number to binary – Add 6 zeros to make a total of N-1 bits – Add an extra one on the left to show that the number is negative

Representation of Zero in Sign and Magnitude Representation Issue: Two representations of zero – +0  – -0 