(2) Computer Structure

(2) Computer Structure - We are familiar with base-10...

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

View Full Document Right Arrow Icon
1 Nathan Friedman 2009 ` We are familiar with “base-10” numbers In “base-10,” every “column” has 10 choices (any number from 0-9) ` Computers use “binary,” where there are only 2cho ices(0and1) 2009 Computer Strtucture 2 Let’s look at the number 6213 We can write this number as 3 * 1 + 1 * 10 + 2 * 100 + 6 * 1000 where 1,10,100,1000 are powers of 10 2009 Computer Strtucture 3 ` However, instead of writing it as “sums of multiples of powers of 10” we can write it as “sums of multiples of powers of 2” (or 3,4,5,100,etc) 6213 = 1*4096 + 0*2048 + 1*1024 + 1*512 + 1*256 + 1*128 + 1*64 + 1*32 + 0*16 + 0*8 + 0*4 + 0*2 + 1*1 2009 Computer Strtucture 4 ` Using these powers of two, we can represent values in binary ` http://www.youtube.com/watch?v=4p-9-nK-mwY 2009 Computer Strtucture 5 6213 = 1*4096 + 0*2048 + 1*1024 + 1*512 + 1*256 + 1*128 + 1*64 + 1*32 + 0*16 + 0*8 + 0*4 + 0*2 + 1*1 = 1011111100001 2009 Computer Strtucture 6
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 There are 10 types of people in this world. 2009 Computer Strtucture 7 There are 10 types of people in this world. Those that understand binary, and those that don't. 2009 Computer Strtucture 8 6213 = 1*4096 + 8*256 + 4*16 + 5*1 = 1845 (in base-16) 1845 (in base 16) We only have 10 digits, so we use letters A-F when the coefficients are more than 9 2009 Computer Strtucture 9 ` Since computers can only work in binary, if we were designing a computer that could add 2 numbers together, we'd need to put the circuitry together correctly to add using the base-2 algorithm—and not the base-10 one. base 2 algorithm and not the base 10 one. 2009 Computer Strtucture 10 ` Understanding the basic structure of a modern computer will help us understand some of the concepts that occur in Fortran and C ` These languages were developed to allow us These languages were developed to allow us use mathematical terminology in programming ` However they were also developed to take advangtage of the hardware of the computer 2009 Computer Strtucture 11 ` At the lowest level a computer is just a collection of switches that can be on or off (representing 1 and 0). ` The circuitry is organized into components that serve different functions such decoding that serve different functions such decoding bit sequences, carrying out simple arithmetic operations, etc. ` These switches also form the memory of the computer and can store the data being manipulated 2009 Computer Strtucture 12
Background image of page 2
3 ` Modern computers are called Von Neumann Machines ` John Von Neumann is credited with the idea that programs can be encoded and stored in the memory just like data ` A control unit transfers instructions from the memory into registers ` These instructions are executed and can access data stored in the memory 2009 Computer Strtucture 13 CPU Computer Ct Memory 2009 Computer Strtucture 14 Control Registers Input Devices Output Devices Branch Control Data& cache 2009 Computer Strtucture 15 Instruction& cache Bus Integer& data-& path Floating-& point& datapath `
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/15/2010 for the course COMP COMP 206 taught by Professor Vybihal during the Spring '04 term at McGill.

Page1 / 8

(2) Computer Structure - We are familiar with base-10...

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

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