Unformatted text preview:

Topic 2 Base Conversions Chapter 1 Part 2 A n n o u n c e m e n t Lab 2 Simple Computer Quiz 2 Simple Computer Turn the labs in separately do not staple together Check the Calendar for due dates Chapter 1 A Simple Computer Part 2 1 of 32 1 A V C e o r m y p u S t i e m r p l e Think of a computer as a group of switches Each switch is either on or off On is represented with a 1 Off is represented with a 0 The most basic computer can be represented as a machine with 1 switch The computer could only understand two instructions on or off Chapter 1 A Simple Computer Part 2 S w i Let s picture a house that has only one light switch S t Instructions i c 0 lights off n h g 1 lights on l H e o u Note 1 switch 2 instructions s e Chapter 1 A Simple Computer Part 2 2 of 32 3 of 32 2 L e t s e x p a n d t h 2 switches a t Instructions 00 Front Back lights off 01 Front on Back off 10 Front off Back on 11 Front Back lights on a b i t Note 2 switches 4 or 2 x 2 or 22 instructions Chapter 1 A Simple Computer Part 2 4 of 32 A 3 Switches n Instructions d Front Middle Back o n e m o r e 000 001 010 011 100 101 110 111 Based on this How many instructions Would a computer with 16 switches understand Note 3 switches 2 x 2 x 2 23 8 instructions 5 of 32 3 B i a A single Binary Digit is a Bit t n It takes 8 Bits to store a single character 8 Bits is called a Byte s d Each character has a numerical representation on an ASCII chart A ASCII American Standard Code of Information Interchange B S Each code consists of a 7 bit code that represents every number letter and symbol y C The 8 bit is a check bit used for error checking t I Extended version of ASCII 256 Characters e I s This is sufficient for English but not for foreign languages th Chapter 1 A Simple Computer Part 2 U n i c o d e 6 of 32 Unicode was developed for international use Because ASCII did not have enough characters Unicode uses 216 characters that s 65 000 The first 256 28 characters correspond to ASCII Not all of the codes have been used so UNICODE can be expanded Chapter 1 A Simple Computer Part 2 7 of 32 4 t N h u e m b M e a r c s h i n e We think in decimal Base 10 Computers use Binary Base 2 0 s 1 s We need to be able to convert from decimal to binary Since Binary numbers get long fast Eg 10000001 129 It is easier for us to convert from binary to octal or hexadecimal equivalents than from binary to decimal It is easier to convert to binary from oct and hex numbers than from decimal to binary Chapter 1 A Simple Computer Part 2 T h e S y D s e t c e i m m a l 8 of 32 Brought to us by the Hindus 400 A D They Arabs picked up on it in 800 A D And Europeans discovered it in 1200 A D It is a great system because It is easy to deal with large quantities with relatively few symbols It is easy to carry and borrow The decimal systems makes use of 10 digits 0 9 These symbols have a place value or positional concept which allow us to represent any whole number The term digit relates to fingers and toes we have 10 so this system makes sense to us 9 of 32 5 P o s i t i o n a l Position MATTERS 352 in decimal 300 50 2 3 x 102 5 x 101 2 x 100 c o n c e p t The position determines the power in which we raise the base 10 ten because we use base 10 If we used base 2 10 would 2 Base AKA Radix Chapter 1 A Simple Computer Part 2 P o s i t i o n a l 10 of 32 Rules for Positional Notation N o t a t i o n 1 The number of distinct symbols equals the base in base 10 they are 0 1 2 3 4 5 6 7 8 9 2 The largest value represented by 1 symbol is one less than the base for base 10 this is 9 3 Each value of a number is multiplied by the base raised to the appropriate power relative to its position e g 352 3 x 102 5 x 101 2 x 100 4 The symbols 10 represents the base for base 10 this is ten Chapter 1 A Simple Computer Part 2 11 of 32 6 Decimal Binary Octal Hexadecimal 0 0 0 0 1 1 1 1 2 10 2 2 3 11 3 3 4 100 4 4 5 101 5 5 6 110 6 6 7 111 7 7 8 1000 10 8 9 1001 11 9 10 1010 12 A 11 1011 13 B 12 1100 14 C 13 1101 15 D 14 1110 16 E 15 1111 17 F 16 10000 20 10 12 of 32 N u m W b o e r r k Think of 32510 NOTE The exponent is 1 less than the position 3 2 5 102 101 100 100 10 1 We multiply these 2 s in each col Add Base 10 Now let s try that in Binary 0 1 0 1 0 0 0 1 0 1 29 28 27 26 25 24 23 22 21 20 64 32 16 8 4 2 1 512 256 128 13 of 32 Chapter 1 A Simple Computer Part 2 H o w S y s t e m s 7 C o n v e r t i n g Converting TO Decimal is easy Just think about the positional notation t o Convert 110012 to base 10 D 110012 1 x 24 1 x 23 0 x 22 0 x 21 1 x 20 e 24 23 0 0 1 c This denotes 16 8 1 Base 2 i 2510 m B a i l n a r y This is called the Anything raised to the 0th power 1 sum of the expansion of products Chapter 1 A Simple Computer Part 2 Works for any base Converting to base 10 decimal 2 1 0 1258 1 x 8 2 x 8 5 x 8 1 x 64 2 x 8 5 x 1 64 16 5 8510 14 of 32 S u m o f E x p a n s i o n t …


View Full Document

Saddleback CS 1A - Simple Computer

Loading Unlocking...
Login

Join to view Simple Computer and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Simple Computer and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?