Unsigned Binary Encoding

Slides:



Advertisements
Similar presentations
DAT2343 Summary of Standard Data Encoding © Alan T. Pinck / Algonquin College; 2003.
Advertisements

Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
2-1 Chapter 2 - Data Representation Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring Computer Architecture.
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.
DAT2343 Comparison of The LMC and General Computer Models © Alan T. Pinck / Algonquin College; 2003.
EMB1006 The Binary System There is no 2 Jonathan-Lee Jones.
King Fahd University of Petroleum and Minerals
Assembly Language and Computer Architecture Using C++ and Java
Representing Information as Bit Patterns Lecture 4 CSCI 1405, CSCI 1301 Introduction to Computer Science Fall 2009.
Assembly Language and Computer Architecture Using C++ and Java
1 Binary Arithmetic, Subtraction The rules for binary arithmetic are: = 0, carry = = 1, carry = = 1, carry = = 0, carry =
1 CSE1301 Computer Programming Lecture 33 Supplement: Conversions: Unsigned Binary to Decimal Decimal to Unsigned Binary.
SIMS-201 Representing Information in Binary. 2  Overview Chapter 3: The search for an appropriate code Bits as building blocks of information Binary.
The Binary Number System
1 Binary Numbers Again Recall that N binary digits (N bits) can represent unsigned integers from 0 to 2 N bits = 0 to 15 8 bits = 0 to bits.
Binary Numbers.
Number Systems Lecture 02.
Binary Number Systems.
Binary Representation and Computer Arithmetic
The Binary Number System
Data Representation Number Systems.
© Janice Regan, CMPT 128, Jan CMPT 128: Introduction to Computing Science for Engineering Students Integer Data representation Addition and Multiplication.
Simple Data Type Representation and conversion of numbers
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.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Binary Real Numbers. Introduction Computers must be able to represent real numbers (numbers w/ fractions) Two different ways:  Fixed-point  Floating-point.
IT253: Computer Organization
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles of Computer.
Copyright © 2002 W. A. Tucker1 Chapter 7 Lecture Notes Bill Tucker Austin Community College COSC 1315.
UNIVERSAL COLLEGE OF ENGINEERING AND TECHNOLOGY PREPARED BY:- Chirag Parmar ( ) Kashish Soni ( ) Maitrey Bhatt( )
Representing numbers and Basic MATLAB 1. Representing numbers  numbers used by computers do not behave the same as numbers used in mathematics  e.g.,
BR 8/99 Binary Numbers Again Recall than N binary digits (N bits) can represent unsigned integers from 0 to 2 N bits = 0 to 15 8 bits = 0 to 255.
CEC 220 Digital Circuit Design Binary Codes
Phys 4330 Digital ElectronicsBinary System Digital circuits process signals that contain just two voltage levels or states, labeled logic "0" and logic.
Lecture 6 Excess Notation. Excess 8 notation indicates that the value for zero is the bit pattern for 8, that is 1000 Excess 8 notation indicates that.
CEC 220 Digital Circuit Design Binary Codes Mon, Aug 31 CEC 220 Digital Circuit Design Slide 1 of 14.
ECE DIGITAL LOGIC LECTURE 3: DIGITAL COMPUTER AND NUMBER SYSTEMS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/19/2016.
Section 5 Digital Electronic Circuits. Chapter 32 Binary Number System.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
Understanding Computers
Numerical Representation Intro to Computer Science CS1510 Dr. Sarah Diesburg 1.
Department of Computer Science Georgia State University
Fundamentals of Computer Science
Data Representation COE 308 Computer Architecture
Understanding binary Understanding Computers.
Computer Architecture & Operations I
Invitation to Computer Science, C++ Version, Fourth Edition
Programming and Data Structure
Data Representation ICS 233
Lec 3: Data Representation
Lecture No. 4 Number Systems
Number Representation
3.1 Denary, Binary and Hexadecimal Number Systems
Digital Logic & Design Dr. Waseem Ikram Lecture 02.
Standard Data Encoding
Binary Positional Notation
Invitation to Computer Science, Java Version, Third Edition
Data Representation COE 301 Computer Organization
Numerical Representation
Data Representation Data Types Complements Fixed Point Representation
Subtraction The arithmetic we did so far was limited to unsigned (positive) integers. Today we’ll consider negative numbers and subtraction. The main problem.
Digital Logic & Design Lecture 02.
1.6) Storing Integer:.
Chapter 2: Number Systems
Storing Negative Integers
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Data Representation ICS 233
Networks & I/O Devices.
Data Representation COE 308 Computer Architecture
Numerical Representation
Presentation transcript:

Unsigned Binary Encoding DAT2343 Unsigned Binary Encoding Encoding unsigned binary values using binary circuits. © Alan T. Pinck / Algonquin College; 2003

The Most Common “Standard” Encoding System: Unsigned Binary is used to represent: integer values greater than or equal to zero is used by almost every computer system as its basic numeric coding system Rather than invent our own encoding system each time we wish to represent a value, certain "standard" systems are normally used. One of the simplest of the "standard" systems is called Unsigned Binary Encoding. Unsigned binary encoding is used to represent integer values which are greater than or equal to zero (up to some maximum limit, which we will discuss in a minute).

Terminology bit binary digit (a binary circuit) As a terminology note: Since each circuit is used to represent a "binary digit", it is more common to refer to these positions as "bits", short for "binary digit", than as circuits.

Positional Notation A 1 in any position represents a value which is one greater than the largest value that can be represented using on the digit positions to its right. Example: in the number 61543, the “1” represents one more than could be represented using the three positions to its right, that is one more than 999 A '1' in any position represents the value which is one greater than the largest possible value which can be represent using all the positions to the right of this position. In the example on this slide, there are 3 decimal digit positions to the right of the 1. The largest value that can be represented with 3 decimal digits is 999. The 1 represents 1000, one more than 999.

Position Identification Example: An 8-circuit collection (where each of the boxes represents one circuit which could be either 0/off or 1/on). In binary we typically number the positions, Starting at the right, and numbering from zero. In this way the positions of an 8-circuit pattern would be numbered as 7, 6, 5, 4, 3, 2, 1, and 0 (reading from left to right).

Bit Position Weights If the bit in position 0 ("bit 0") is "on" (a 1) then it represents the value 1 or “has a weight of 1”. If bit 1 is "on" (a 1), it represents the value 2. If both bit 0 and bit 1 are "on", then the value represented is the combination of The weights for bits 0 and 1, that is a combination of 1 and 2, 3. If bit 2 is "on" (a 1), it represents the value (or has a “weight” of ) 4 4 being the first value that can not be represented using only bits 0 and 1. If bits 2, 1, and 0 are all "on", then the value represented is the combination of the weights 4 and 2 and 1, namely 7. If bit 3 is "on" (a 1), it represents the value 8; and so on. (For the mathematically inclined, you might also note that the weight of a position is 2 to the power of the position number).

Represented Value Based On Position Weights (using an 8-bit/circuit example) Notice that each bit position can be though of as having a "weight" where this "weight" is added to the total value to be represented if (and only if) the circuit (bit) in that position is "on" (a 1). In the example pattern on this slide The bits in positions 5, 4, 2, and 0 are “on” With respective weights of 32, 16, 4, and 1 The value being represented is the sum of these weights, 53

“Words” the number of circuits (wires) used to represent a basic encoded number (normally unsigned binary) is “hard-wired” in a computer when it is built. the number of circuits used by a specific computer to represent its basic numeric form is called the “word size” of that computer. Unfortunately, in order to be able to manipulate numbers efficiently, in real-world digital computers, it is necessary to set the number of circuits used to represent the basic numeric form (that is, unsigned binary) to a fixed number at the time the computer is built. It is not (in general) possible to use fewer circuits (bits) sometimes when you only need small numbers and more circuits (bits) at other times when you need to represent large numbers. The number of circuits which are "hard-wired" into a computer to be used as for the basic numeric form of encoding Is the computer's "word size". Typically a computer might have a word size of 16 bits, 32 bits, 64 bits, or 128 bits, depending upon the particular computer.

“Words” (continued) the actual collection of circuits used to represent a number in its basic encoded form (for some specific computer) is called a “word”. note: in the terminology of computer architecture, a “word” relates to numbers, and not to what we normally mean by the term “word” in English. An actual collection of circuits used to represent a basic numeric value in some specific computer is called a “word”. Notice that this is a quite different meaning of the word: “word” than we would expect in normal English.

Limitations Imposed By Word-Size A computer is limited in how large a number it can represent in its basic numeric coding system (usually unsigned binary). This limit is the value represented when all the circuits/bits of a “word” are turned “on”. Example: A computer using an 8-bit word would have a maximum value which it could represent (in unsigned binary) of: Notice that the word size of a computer limits the largest value which can be encoded using the basic numeric system (that is, unsigned binary). For example, if a particular computer had an 8-bit word, the largest unsigned binary value which could be encoded would be the sum of its bit weights: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1, 255 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255

End of Lecture