DOC PREVIEW
SJSU CS 147 - Lecture 2

This preview shows page 1-2-3-4-31-32-33-34-35-64-65-66-67 out of 67 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 67 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Lecture 2. How does the computer work?Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10so a k is... k in computing is short for kb or kilobyte where kilo means the same as anywhere else in our measurement system: 1000 so a k is 1000 bytes how about Mb? b for byte again, and M for mega: megabyte big M for mega, small m means milli, or one thousandth, 1/1000 as in mm, thousandths of a metre mega in our measurement system means one million, 1 000 000 or a thousand thousand, so a megabyte is a thousand kilobytes or one million bytes how about GB? you can now buy hard disk drives in Gb, gigabytes, thousands of Mb or thousands of millions of bytes, so a 5Gb HDD holds 5000 Mb of data with some large computers storing up to Tb, terabytes... yup, thousands of Gb... so one terabyte (Tb) = 1000 gigabytes (Gb) = 1000 000 megabytes (Mb) = 1000 000 000 kilobytes (kb) = 1 000 000 000 000 bytes or one thousand billion bytes of informationSlide 12What is a Computer?Slide 14Slide 15Slide 16Slide 17Typical Machine LayoutTypical Machine TranslationWays to Construct a ComputerSlide 21Slide 22Slide 23Von Neumann Model of ExecutionSlide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Data RepresentationComputer MemoryBasic Addressable Unit of MemoryBinary integer arithmeticSlide 38Slide 39Slide 40Slide 41Decimal reviewDecimal to Binary ConversionSlide 44Slide 45Converting binary to decimalConverting decimal to binaryWhy does this work?Slide 49Slide 50Slide 51Slide 52Slide 53Slide 54Base 8 (Octal )Slide 56Slide 57Slide 58Slide 59Base 16 is useful tooSlide 61Slide 62Slide 63ExercisesBinary and hexadecimal conversionsClass ExerciseOther BasesLecture 2. How does the computer work?Prof. Sin-Min LeeDepartment of Computer Science‘Computer” of the dayJacquard loomlate 1700’sfor weaving silk“Program” on punch cards“Microcode”: each holelifts a set of threads“Or gate”: thread lifted if any controlling hole punchedCard Punch• Early “programmers” were well-paid (compared to loom operators)Computer Architecture = Instruction Set Architecture + Machine Organization + …Intel, the world's biggest semiconductor maker, said Monday it built a test chip with a new process that creates faster circuits by packing 10 million transistors into an area the size of the tip of a ballpoint pen.Intel, based in Santa Clara, Calif., has made the first working memory chip that uses so-called 65-nanometer technology to shrink the circuits inside chips, Intel researcher Mark Bohr said during a conference call.Aug. 31, 2004, 12:05AMBig gain in small packageIntel test chip boasts technology to add to speedBitso a k is...k in computing is short for kb or kilobyte where kilo means the same as anywhere else in our measurement system: 1000 so a k is 1000 byteshow about Mb?b for byte again, and M for mega: megabyte big M for mega, small m means milli, or one thousandth, 1/1000 as in mm, thousandths of a metremega in our measurement system means one million, 1 000 000 or a thousand thousand, so a megabyte is a thousand kilobytes or one million byteshow about GB?you can now buy hard disk drives in Gb, gigabytes, thousands of Mb or thousands of millions of bytes, so a 5Gb HDD holds 5000 Mb of data with some large computers storing up to Tb, terabytes... yup, thousands of Gb... so one terabyte (Tb) = 1000 gigabytes (Gb) = 1000 000 megabytes (Mb) = 1000 000 000 kilobytes (kb) = 1 000 000 000 000 bytes or one thousand billion bytes of informationWhat is a Computer?•Data•Primitive Operations•Sequence Control•Data Access•Storage Management•Operating EnvironmentMay be actual hardware computer or software-simulated computer.Most computers a combination of the two.In mathematics you don't understand things. You just get used to them.John von NeumannTypical Machine LayoutTwo cycles:•Fetch cycle - get instruction•Execute cycle - do operationTypical Machine TranslationFor example: As we see later, memory for data in blocks of storage pointed to by a register:X = Y + Zcould be translated as:load R1, R2, 28 [Location of Y]add R1, R2, 40 [Location of Z]store R1, R2, 24 [Location of X]Instruction format: Opcode register, index, offsetload R1, R2, 24Ways to Construct a Computer•Hardware Realization–Any precisely defined algorithm or data structure may be realized in hardware.•Firmware Realization–Microprogramming or emulation•Virtual Machine–Provided by a language environment•CombinationVon Neumann Model of ExecutionInstructionFetchInstructionDecodeOperandFetchExecuteResultStoreNextInstructionObtain instruction from program storageDetermine required actions and instruction sizeLocate and obtain operand dataCompute result value or statusDeposit results in storage for later useDetermine successor instructionAlmost all ModernComputers areVon NeumannmachinesData Representation•Data comes in different forms such as numbers, text, images, audio, video, …•How does the computer handle all the different data types?•The most efficient solution is to use a uniform representation of data. All data from outside a computer are transformed into this uniform representation.•The universal format is called a bit pattern (a sequence of bits).Computer Memory•Memory is comprised of a large collection of bi-state (off/on) electrical devices called bits (binary digits)•A single bit can assume the value 0 or 1.•A single bit is not sufficient to represent all data ; therefore, it is necessary to use a sequence of bits.Basic Addressable Unit of Memory•A byte is the basic addressable unit of memory.•In virtually all modern computers, a byte consists of 8 bits.•As indicated on the previous slide, an 8-bit byte can encode 256 distinct values.Binary integer arithmetic•Integers are stored in a computer using a fixed number of binary digits to encode each value.Decimal systemBinary system•The binary system is based on 2. •There are only two digits: 0 and 1•We convert a number from binary to decimal by multiplying each binary digit by its corresponding power of 2. i.e. Multiply the bit at position n (n = 0, 1, 2, …) by n2Binary systemBinary to Decimal ConversionBinary number1. Convert the binary number 10011 to decimal.2. Convert the binary number 1110101 to decimal.ExercisesDecimal review•Numbers consist of a bunch of digits, each with a weight:•The weights are all powers of the base, which is 10. We can rewrite the weights like this:•To


View Full Document

SJSU CS 147 - Lecture 2

Documents in this Course
Cache

Cache

24 pages

Memory

Memory

54 pages

Memory

Memory

70 pages

Lecture 1

Lecture 1

53 pages

Cisc

Cisc

18 pages

Quiz 1

Quiz 1

4 pages

LECTURE 2

LECTURE 2

66 pages

RISC

RISC

40 pages

LECTURE 2

LECTURE 2

66 pages

Lecture1

Lecture1

53 pages

Chapter 5

Chapter 5

14 pages

Memory

Memory

27 pages

Counters

Counters

62 pages

Load more
Download Lecture 2
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 2 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 Lecture 2 2 2 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?