Ch2 - Ramesh Yerraballi 2-1 EE 306 Introduction to...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Ramesh Yerraballi 2-1 EE 306 Introduction to Computing Chapter 2: Bits, Data Types and Operations Ramesh Yerraballi 2-2 Data Representation Symbols Numbers: 0,1,2 ..9 Alphabet: A-Z,a-z 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 2-3 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 2-4 Unsigned Binary Integers 00000100 00100 100 4 00000011 00011 011 3 00000010 00010 010 2 00000001 00001 001 1 00000000 00000 000 8-bits 5-bits 3-bits 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 2-5 Signed Magnitude Leading bit is the sign bit 00100 +4 10100-4 10011-3 10010-2 00011 +3 00010 +2 00001 +1 00000 +0 10000-0 10001-1 Range is:-2 N-1 + 1 < i < 2 N-1- 1 Y = “abc” = (-1) a (b.2 1 + c.2 ) Problems: • How do we do addition/subtraction? Ramesh Yerraballi 2-5 Signed Magnitude Leading bit is the sign bit 00100 +4 10100-4 10011-3 10010-2 00011 +3 00010 +2 00001 +1 00000 +0 10000-0 10001-1 Range is:-2 N-1 + 1 < i < 2 N-1- 1 Y = “abc” = (-1) a (b.2 1 + c.2 ) Problems: • How do we do addition/subtraction?...
View Full Document

{[ snackBarMessage ]}

Page1 / 23

Ch2 - Ramesh Yerraballi 2-1 EE 306 Introduction to...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online