DOC PREVIEW
BU CS 101 - Computer Hardware (overview)
Pages 25

This preview shows page 1-2-24-25 out of 25 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 25 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 25 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 25 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 25 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 25 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 256-1Computer Hardware (overview)•Remember:–The connection between boolean logic and circuits and computing–boolean logic sentences can be expressed in hardware–that hardware can evaluate such logic for us–if the logic is useful (say, can add bits or store bits) we have useful circuits that can be the foundation of our G-P-E-D computer•In this lecture:–Building up from circuits to a whole computer–what does a programmable computer consist of–how do the various components work •(and why do we need them anyway?)6-2Building “computers”•Transistors allow us to build physical components that can compute. –Devices whose output vary based on their input–These physical devices can vary what they produce based on their input•we use transistors to build logic gates•we use logic gates to describe the building of logic circuits•we use logic circuits to embody logical sentences–And any binary logical sentence we write can be “evaluated” (computed) for us, by this physical device–Similarly any logical sentence we write can be physically built6-3Building the circuit–Carry out = (A  B)  (A  C)  (B  C)–Sum = (A XOR B) XOR CABC-inSumC-outA  CA  BB  C(A  B)  (A  C)((A  B)  (A  C))  (B  C)A XOR B(A XOR B) XOR C6-4Building Memory from Circuits•Flip-flop style memorysetresetqq’100011•Using NOR gates, the circuit preserves the signal entered:–Send 1 on set and q = 1–Send 0 on reset and q = 0•The Flip-Flop gives you a (simplified) idea of how RAM is actually built6-5Example problem•We wish to build a physical “computer” that can compute if a given 2 bit number “A” (a1, a0) is greater than a given 2 bit number “B” (b1, b0)–so... A = (21 * a1) + (20 * a0) B = (21 * b1) + (20 * b0)–Construct a binary sentence “Z” that will be true if and only if A is greater than B. •A and B don't really exist – only a0, a1, b0 and b1 exist•Hint: Consider what the truth table with a Z column looks like–How do I build the sentence?•How can I check my work?6-6Example problem•A = (21 * a1) + (20 * a0) –So, if a1 is “1” this means there is a 2 in the number A(and thus A is either 2, or 3)or if a1 is “0” then there is no 2 in the number A(and thus A is either 0 or 1)And if a0 is “1” means there is a 1 in the number A (so the number is either 3 or 1)or if a0 is “0” then there is no 1 in the number A (so the number is either 2 or 0)–If a1 is “1” and b1 is “0” which number is bigger?–What if a1 and b1 are both 1 or both 0? –How do we decide?6-7Example problem•We want Z to be true if A > B–what makes A > B?–A1 = 1 and B1 = 0•or–A0 = 1 and B0 = 0 and (A1 and B1 are equal, either both 0 or both 1)Z = (A1 and (not B1)) or (A0 and (not B0) and A1 and B1) or (A0 and (not B0) and (not A1) and (not B1))•to prove it, we'd have to construct a truth table (with 16 rows)... yikes6-8From then to now...•Transistors have “shrunk” to microscopic proportions(CMOS technology)–How small is small?•Consider new advances from Samsung to store 4 gigabytes of memory into a region smaller then a match-book–1 Gigabyte = 1,024 Megabytes–1 Megabyte = 1,024 Kilobytes–1 Kilobyte = 1,024 bytes–1 byte = 8 bits•That's a lot of bits in a tiny space...6-9The Science of Abstraction•Now that you understand circuits, we can forget about them (to some extent)–We can assume that the functionality exists •for example:–1's and 0's are abstractions of voltage–logic gates are abstractions of transistors–“black boxes” (e.g., adder box) as abstractions for logic gates –more complicated boxes on top of those boxes...•e.g., 3-bit adders from full adders–We don't need to worry about how things are done at the lowest level, in computer science we “build up” and take the lower levels for granted6-10Remember: Von Neumann•This model is called the von Neumann computerCPU(Central Processing Unit)InputUnitsOutputUnits(Primary) Memory6-11Remember: Von Neumann•Remember why we need memory:–Memory•Programs and data are stored in the same primary memory–A program is a list of “instructions” for the CPU–The CPU consists of “lots” of logical circuits that accomplish a small number of different tasks/instructionsCPUInputUnitsOutputUnitsMemory6-12Instructions & Programs•Arithmetic Instructions–Addition, subtraction, multiplication, division, and other numeric operations•Data Movement Instructions–Move numbers from place in memory to place in memory•Logical or Comparison Instructions–Decision making e.g. if(x < 10)•Control Instructions–Controls the sequences in which instructions are executed e.g. for x = 1 to 10•Input/Output Instructions–Allow the program to communicate with “other devices”6-13The Central Processing Unit•The Central Processing Unit (CPU)–Often referred to as the “brain” of the computer.–Responsible for controlling all activities of the computer system.–Has it’s own small amount of fast memory (CPU cache memory)–The three major components of the CPU are:1. Instruction Decoding Unit (Decodes the instruction)–translates the instruction into appropriate circuit paths2. Control Unit (has two locations where numbers are kept)1. Instruction register (instruction placed here for analysis)2. Program counter (Which instruction will be performed next?)3. Arithmetic Unit (Computations performed)1. Accumulator (Results of computations kept here)6-14The CPU •Instructions for the CPU may seem very basic–Get a number (i.e., bits) from memory and place in the accumulator–Put the contents of the accumulator somewhere in memory–Add some bits from memory into the accumulator–Apply some test to the value in the accumulator and get the result as true or false–…•A program is then a list of these basic operations strung together to perform more complicated tasks6-15The fetch and execute cycleThe fetch and execute cycle:Start Program at the desired location.Fetch an instruction from program memory at current program counter locationIncrement counter to next locationin the program memory.Execute the instruction whichwas just fetched.StopIs this a STOP instruction?YES NO6-16Remember: Von Neumann•Von


View Full Document

BU CS 101 - Computer Hardware (overview)

Download Computer Hardware (overview)
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 Computer Hardware (overview) 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 Computer Hardware (overview) 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?