This preview shows pages 1–6. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Ramesh Yerraballi 21 EE 306 Introduction to Computing Chapter 2: Bits, Data Types and Operations Ramesh Yerraballi 22 Data Representation Symbols Numbers: 0,1,2 ..9 Alphabet: AZ,az Other: +*=/… Why not use multiple voltages to represent Numbers? Say 0v = 0; 0.1v=1; 0.2v=2;… Keep it simple Binary • Presence of voltage> 1 • Absence of voltage> 0 Notation lengthy but easy! Ramesh Yerraballi 23 Decimal Numbers “decimal” means that we have ten digits to use in our representation (the symbols 0 through 9) What is 3,546? it is three thousands plus five hundreds plus four tens plus six ones . How about negative numbers? we use two more symbols to distinguish positive and negative: + and  Ramesh Yerraballi 24 Unsigned Binary Integers 00000100 00100 100 4 00000011 00011 011 3 00000010 00010 010 2 00000001 00001 001 1 00000000 00000 000 8bits 5bits 3bits Y = “abc” = a.2 2 + b.2 1 + c.2 N = number of bits Range is: 0 ≤ i < 2 N 1 (where the digits a, b, c can each take on the values of 0 or 1 only) Problem: • How do we represent negative numbers? Ramesh Yerraballi 25 Signed Magnitude Leading bit is the sign bit 00100 +4 101004 100113 100102 00011 +3 00010 +2 00001 +1 00000 +0 100000 100011 Range is:2 N1 + 1 < i < 2 N1 1 Y = “abc” = (1) a (b.2 1 + c.2 ) Problems: • How do we do addition/subtraction? Ramesh Yerraballi 25 Signed Magnitude Leading bit is the sign bit 00100 +4 101004 100113 100102 00011 +3 00010 +2 00001 +1 00000 +0 100000 100011 Range is:2 N1 + 1 < i < 2 N1 1 Y = “abc” = (1) a (b.2 1 + c.2 ) Problems: • How do we do addition/subtraction?...
View
Full
Document
This note was uploaded on 04/17/2008 for the course EE 306 taught by Professor Ambler during the Spring '07 term at University of Texas.
 Spring '07
 Ambler
 Volt

Click to edit the document details