BCD = Binary Coded Decimal

Slides:



Advertisements
Similar presentations
Conversion and Coding (12)10.
Advertisements

NUMBERS DESCRIBE THE SYSTEM
2’s Complement Arithmetic (remember it’s a fixed length system)
1 Module 2: Floating-Point Representation. 2 Floating Point Numbers ■ Significant x base exponent ■ Example:
Quiz 1.1 Convert the following unsigned binary numbers to their decimal equivalent: Number2 Number
Number System and Codes
Lecture 8 Floating point format
Data Storage. SIGN AND MAGNITUDE Storing and representing numbers.
Binary Representation and Computer Arithmetic
Convert Decimal to Floating point number [IEEE 754]
2-1 Chapter 2 - Data Representation Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Chapter Contents.
A little bit of exercise.. ;). Exercise Given to you are some binary to decimal examples : Given to you are some binary to decimal examples : Tens Units.
Number Systems So far we have studied the following integer number systems in computer Unsigned numbers Sign/magnitude numbers Two’s complement numbers.
Computer Architecture
Binary Arithmetic & Data representation
Data Representation and Computer Arithmetic
COMPSCI 210 Semester Tutorial 1
Computer Science Engineering B.E.(4 th sem) c omputer system organization Topic-Floating and decimal arithmetic S ubmitted to– Prof. Shweta Agrawal Submitted.
9.4 FLOATING-POINT REPRESENTATION
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
The Teacher CP4 Binary and all that… CP4 Revision.
1 Lecture 2  Complement  Floating Point Number  Character Encoding.
The Teacher CP4 Binary and all that… CP4 Revision.
Integer & Floating Point Representations CDA 3101 Discussion Session 05.
Chapter 1  Number Systems Decimal System Binary System Octal System Hexadecimal System  Binary weighted cods Signed number binary order  1’s and 2’s.
Computing Machinery Chapter 6: Computer Arithmetic.
Floating Point in Binary 1.Place Value Chart:
CEC 220 Digital Circuit Design Binary Codes
Introduction to computers 103 學年度 上學期 Solution of Homework_ch12 授課教授:李錫智.
CS 160 Lecture 4 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
 Do the following conversions:  Solve the following:    /100  10010*110 DecimalOctalHexadecimalBinary 78--
CEC 220 Digital Circuit Design Binary Codes Mon, Aug 31 CEC 220 Digital Circuit Design Slide 1 of 14.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Fixed-point and floating-point numbers Ellen Spertus MCS 111 October 4, 2001.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
Binary Numbers Practice.
Decoders A decoder is a logic circuit that detects the presence of a specific combination of bits at its input. Two simple decoders that detect the presence.
COSC2410: LAB 2 BINARY ARITHMETIC SIGNED NUMBERS FLOATING POINT REPRESENTATION BOOLEAN ALGEBRA 1.
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
COMPUTER ARITHMETIC Binary Coded Decimal Presented By Chung Wai Chow.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
Unit I From Fundamentals of Logic Design by Roth and Kinney.
FLOATING-POINT NUMBER REPRESENTATION
Department of Computer Science Georgia State University
Fundamentals of Computer Science
Computer Science 210 Computer Organization
Signed binary numbers & Binary Codes
Array multiplier TU/e Processor Design 5Z032.
Introduction To Computer Science
Recap Add these numbers together in binary
Data Representation Binary Numbers Binary Addition
Number systems and codes
Numbers in a Computer Unsigned integers Signed magnitude
Number Systems.
بسم الله الرحـــــــمن الرحيم
CSCI206 - Computer Organization & Programming
Number Representations
Topic 3 Number Representations and Computer Arithmetics
Computer Science 210 Computer Organization
Topic 3 Number Representations and Computer Arithmetics
شبکه آموزشی پژوهشی ایران - مادسیج
Chapter 6: Computer Arithmetic
Numbers representations
Storing Integers and Fractions
CS 286 Computer Architecture & Organization
Number Representations
Presentation transcript:

BCD = Binary Coded Decimal

Representing numbers Integers Real numbers 2’s complement is most popular BCD Real numbers Floating point IEEE 754 standard format is most popular Fixed point 2’s complement integers (using standard integer arithmetic) All of the above are supported by IA32!

BCD = binary coded decimal 4 bit encoding of 0..9 (decimal) base 10 base 2 BCD 0 0000 0000 same 1 0000 0001 " 2 0000 0010 " 3 0000 0011 " 4 0000 0100 " 5 0000 0101 " 6 0000 0110 " 7 0000 0111 " 8 0000 1000 " 9 0000 1001 " 10 0000 1010 0001 0000 11 0000 1011 0001 0001 12 0000 1100 0001 0010 . . . ? ? ?

BCD = binary coded decimal 4 bit encoding of 0..9 (decimal) base 10 base 2 BCD 0 0000 0000 same 1 0000 0001 " 2 0000 0010 " 3 0000 0011 " 4 0000 0100 " 5 0000 0101 " 6 0000 0110 " 7 0000 0111 " 8 0000 1000 " 9 0000 1001 " 10 0000 1010 0001 0000 11 0000 1011 0001 0001 12 0000 1100 0001 0010 … … … 99 0110 0011 1001 1001 100 0110 0100 invalid … … invalid 255 1111 1111 invalid

Why BCD? What happened when we converted 0.10 (base 10) to base 2? 0.10 x 2 = 0.20 .0 0.20 x 2 = 0.40 0 0.40 x 2 = 0.80 0 0.80 x 2 = 0.60 1 0.60 x 2 = 0.20 1 .

Binary and BCD addition