Presentation is loading. Please wait.

Presentation is loading. Please wait.

It’s All (just) Bits 1) Numbers are bits 2) Text is bits

Similar presentations


Presentation on theme: "It’s All (just) Bits 1) Numbers are bits 2) Text is bits"— Presentation transcript:

1 source: http://thinkgeek.com

2 It’s All (just) Bits 1) Numbers are bits 2) Text is bits
3) Formatted text is bits 4) Pictures are bits 5) Sounds are bits Paradigm Shift?

3 Bits can be operated on! Example: adding two bits decimal binary
0+0 = = 0 0 0+1 = = 0 1 1+0 = = 0 1 1+1 = = 1 0 2 1 addends sum built using by Josh Tynjala

4 It’s All (just) Bits 1) Numbers are bits 2) Text is bits
3) Formatted text is bits 4) Pictures are bits 5) Sounds are bits 6) Programs (instructions on how to operate on bits) are also bits!

5 multiplexer: chooses 1 bit out of 2 using bits!
data bits 1 selector bit output bit

6 equal to top data bit if selector is 0
data bits output: equal to top data bit if selector is 0 equal to bottom data bit if selector is 1 selector bit built using by Josh Tynjala

7 Computer Architecture in 1 Slide
A program is a sequence of instructions Both data and program sit in memory (RAM) At the heart of your computer is a processor, which simply executes instructions in order, one at a time A processor has a few registers for storing intermediate results (like scratch paper) There are only a few possible instructions and a few registers; anything more complex is built up from there R1 R3 R5 R7 R2 R4 R6 R8

8 Example Instructions 1. R1  100 2. R2  9 3. R3  R1+R2 4. R8  218
Instructions can be encoded as bits: need a code for each operation (e.g., +=1, =2, /=3) write down the operation code, the values, and the register numbers 100 9 109 109 218 R1 R2 R3 R4 R5 R6 R7 R8

9 Memory But we have lots of data; it doesn’t all fit into the few registers. It sits in memory. Big idea: address it. 149 159 150 151 152 153 154 155 156 157 158 v n o e u m a (lots of) memory

10 How to choose a value by location?
Memory But we have lots of data; it doesn’t all fit into the few registers. It sits in memory. Big idea: address it. How to choose a value by location? load into R1 the value in memory at address 153 149 150 151 152 153 154 155 156 157 158 159 118 111 110 32 110 101 117 109 97 110 110 (lots of) memory 110 R1 R3 R5 R7 R2 R4 R6 R8

11 multiplexer: chooses 1 bit out of 2
data bits 1 selector bit output bit

12 choosing 1 bit out of 4 Set selectors to: 00

13 choosing 1 bit out of 4 Set selectors to: 01 (bottom to top) 1

14 choosing 1 bit out of 4 Set selectors to: 10 (bottom to top) 1

15 choosing 1 bit out of 4 Set selectors to: 11 (bottom to top) 1 1

16 choosing 1 bit out of 8 Addresses: 001 000 010 011 100 101 110 111

17 choosing 1 bit out of 8 Addresses: 001 000 010 011 100 101 110 111 1 1

18 How many layers of multiplexers?

19 (more layers of multiplexers)
Program using memory 1. load into R1 the value in memory at address 153 2. R1  R1  32 149 150 151 152 153 154 155 156 157 158 159 118 111 110 32 110 101 117 109 97 110 110 (more layers of multiplexers) 110 R1 R3 R5 R7 R2 R4 R6 R8

20 Program using memory 1. load into R1 the value in memory at address 153 2. R1  R1  32 3. store the value in R1 into memory at address 153 149 150 151 152 153 154 155 156 157 158 159 118 111 110 32 110 101 117 109 97 110 110 R1 R3 R5 R7 R2 R4 R6 R8 78

21 Program using memory 1. load into R1 the value in memory at address 153 2. R1  R1  32 3. store the value in R1 into memory at address 153 149 150 151 152 153 154 155 156 157 158 159 118 111 110 32 110 78 101 117 109 97 110 110 demultiplexers R1 R3 R5 R7 R2 R4 R6 R8 78

22 Program using memory 1. load into R1 the value in memory at address 153 2. R1  R1  32 3. store the value in R1 into memory at address 153 149 150 151 152 153 154 155 156 157 158 159 v o n 110 N e u m a n n R1 R3 R5 R7 R2 R4 R6 R8 78

23 Dilbert by Scott Adams, May 8 2005

24 SO WHAT? It’s All (just) Bits 1) Numbers are bits 2) Text is bits
3) Formatted text is bits 4) Pictures are bits 5) Sound is bits 6) Programs (instructions on how to operate on bits) are also bits!


Download ppt "It’s All (just) Bits 1) Numbers are bits 2) Text is bits"

Similar presentations


Ads by Google