Chapter 02 - Data Types

Chapter 02 - Data Types - CS/ECEn 124 Chapter 2 Binary...

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

View Full Document Right Arrow Icon
BYU CS/ECEn 124 Chapter 2 - Data Types 1 CS/ECEn 124 Chapter 2 Binary Digital System Data Types Conversions Binary Arithmetic Overflow Fixed Point Floating Point Hexadecimal Numbers ASCII Characters
Background image of page 1

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

View Full DocumentRight Arrow Icon
BYU CS/ECEn 124 Chapter 2 - Data Types 2 What are Decimal Numbers? “Decimal” means that we have ten digits to use in our representation of numbers Symbols 0 through 9 Positional notation Most widely used by modern civilizations What is 3,546? 3 thousands + 5 hundreds + 4 tens + 6 ones . 3,546 10 = 3 × 10 3 + 5 × 10 2 + 4 × 10 1 + 6 × 10 0 How about negative numbers? Use two more symbols to distinguish positive from negative numbers, namely, + and -. Digital Binary System
Background image of page 2
BYU CS/ECEn 124 Chapter 2 - Data Types 3 What are Binary Numbers? “Binary” means that we have two digits to use in our representation of numbers Symbols 0 and 1 Positional notation More adaptable for computers What is the decimal value of binary 1011? 1 eights + 0 fours + 1 twos + 1 ones 1011 2 = 1 × 2 3 + 0 × 2 2 + 1 × 2 1 + 1 × 2 0 How about negative numbers? We don’t want to add additional symbols So… Digital Binary System
Background image of page 3

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

View Full DocumentRight Arrow Icon
BYU CS/ECEn 124 Chapter 2 - Data Types 4 Binary Digital System Binary (base 2) because there are two states, 0 and 1. Digital because there are a finite number of symbols. Basic unit of information is the binary digit , or bit . Bit values are represented by various physical means. Voltages Residual magnetism Light Polarization Values with more than two states require multiple bits. A collection of 2 bits has 4 possible states: 00, 01, 10, 11 A collection of 3 bits has 8 possible states: 000, 001, 010, 011, 100, 101, 110, 111 A collection of n bits has 2 n possible states. Digital Binary System
Background image of page 4
BYU CS/ECEn 124 Chapter 2 - Data Types 5 Electronic Representation of a Bit Relies only on approximate physical values. A logical ‘1’ is a relatively high voltage (2.4V - 5V). A logical ‘0’ is a relatively low voltage (0V - 1V). Analog processing relies on exact values which are affected by temperature, age, etc. Analog values are never quite the same. Each time you play a vinyl album, it will sound a bit different. CDs sound the same no matter how many times you play them. Digital Binary System
Background image of page 5

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

View Full DocumentRight Arrow Icon
BYU CS/ECEn 124 Chapter 2 - Data Types 6 The Power of the Bit… Bits rely on approximate physical values that are not affected by age, temperature, etc. Music that never degrades. Pictures that never get dusty or scratched. By using groups of bits, we can achieve high precision. 8 bits
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 37

Chapter 02 - Data Types - CS/ECEn 124 Chapter 2 Binary...

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

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