Download presentation
Presentation is loading. Please wait.
Published byRandolf Alexander Modified over 8 years ago
1
Abstraction
2
Not real, not concrete A view that is removed from the reality Definitely has a "base" in reality – the "base" may be non-intuitive and not readily apparent which feature(s) are shown in the abstraction – different abstractions of the same base may seem completely different
3
Big Idea: Abstractions Hide Complexity!
4
Layers of Abstraction in a Computer
8
Binary Representations Electronic Implementation Electronic Implementation – Easy to store with bistable elements – Reliably transmitted on noisy and inaccurate wires 0.0V 0.5V 2.8V 3.3V 010
9
Now What? So we can represent a 1 and a 0 with hardware How are we supposed to do anything with a 1 and a 0?
10
Let's combine them!
11
Non-active gate
12
Active gate
13
Boolean logic Boolean logic: Operates on True (1) and False (0) Operators: AND, OR, NOT Boolean expression, truth table, combinational circuit All three are equivalent
15
Truth table: Give output for all input combinations 1 boolean input variable, how many values? 2 boolean input variables, how many combinations of values? 3 boolean input variables? K boolean inputs variables?
16
Truth table practice ABCOut 000 001 010 011 100 101 110 111
17
Converting a Truth Table to a Circuit
18
Create a circuit / table for the output of addition A + B = ?
19
A 1-bit adder with carry C in = carry in C out = carry out S = sum for 1-bit
20
Key Hardware Abstractions Binary System – hides the voltage details of the electronic signal – uses multiple signal paths to group 0s and 1s – base 2 number – Allows us to represent many different data forms, including numbers, text, pictures with just 2 states: 1's and 0's Boolean Logic – Allows us to represent the logic used in transistors and electronic circuits/gates
21
http://forums.cisco.com/CertCom/game/binar y_game_page.htm
22
Modular design for bit-addition
23
32-bit adder Connect 32 1-bit adders to each other, with C out from one step becoming C in for the next step We can now add really large numbers together! Not so impressive, but here is what is impressive: IADDL $64, %eax ADDL %eax, %edx (Intel processor instructions to add 64 to the register named eax and then use eax as an input to the next add instruction which adds the contents of eax and edx and stores the result in edx)
24
Key Hardware Abstraction Instruction Set – Allows us to represent complicated boolean logic that combines many boolean inputs as a single instruction
25
Key Hardware Abstraction Register – Allows us to store the result of one instruction for use in a later instruction
26
Abstraction Layer Computer Architecture Combinational Logic Compute Boolean functions of inputs Continuously respond to input changes Operate on data and implement control Storage Elements Store bits Addressable memories Non-addressable registers All abstracted nicely by a nifty Instruction Set! Register file Register file A B W dstW srcA valA srcB valB valW Clock ALUALU fun A B MUX 0 1 = Clock
27
But wait... What happened to all of the other "pieces" of a computer?
28
One last Key Abstraction Virtual Memory – All program input and output can be done with a single giant memory block that is byte addressable – The memory block is not real though, it is an abstraction! Different addresses of the block are mapped to different components in the system (main memory, DVD drive, hard drive, wireless network card, video card, etc.)
29
The power of abstraction MOVL %eax, $100 (writes the contents of register eax to memory location 100, which could be mapped to a file on a USB disk drive, or to a pixel in the upper left of your screen, or to any device on your computer, including a buffer on your wireless network card to be sent as a text message to your friend!)
30
Role Play Game activity time!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.