Chapter 02 - Data Types

# Chapter 02 - Data Types - BYU CS/ECEn 124 Chapter 2 - Data...

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

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

View Full Document

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

View Full Document

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

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

Unformatted text preview: 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 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 How about negative numbers? Use two more symbols to distinguish positive from negative numbers, namely, + and -. Digital Binary System 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 + fours + 1 twos + 1 ones 1011 2 = 1 2 3 + 2 2 + 1 2 1 + 1 2 How about negative numbers? We dont want to add additional symbols So Digital Binary System 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 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 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....
View Full Document

## This document was uploaded on 02/06/2012.

### Page1 / 37

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

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

View Full Document
Ask a homework question - tutors are online