Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP 1321 Digital Infrastructure

Similar presentations


Presentation on theme: "COMP 1321 Digital Infrastructure"— Presentation transcript:

1 COMP 1321 Digital Infrastructure
Richard Henson University of Worcester October 2018

2 Week 2: Binary Numbers and CPUs
Objectives of session: Explain the CPU as the fundamental part of the computer Explain why binary numbers are fundamental to computing Convert between binary and hexadecimal numbers Explain the structure of typical CPU

3 Origins of the CPU All about processing data Needs a mechanism for
adding data (input) removing processed data (output) storing data outside the CPU In early days (e.g. Bletchley Park) data input, output, movement, storage were all paper-based… very slow!

4 Binary Numbers Base 2 number system… based on symbols 0 and 1
perfect fit with Boole & logic states (1850s) surprising no-one before Shannon (1930s) grasped this idea!!! To represent binary in real world… need “on/off” switches mechanical… slow but gotta start somewhere… (!)

5 Electrical Storage of Binary?
Possible using: Relays on – magnet has current/off – magnet no current Transistors Semiconductor creates current on/off states binary numbers electrical off = 0; on = 1

6 More from Shannon (1948) Demonstrated the essential unity of all information media: text telephone signals radio waves pictures, film, etc… ALL could be represented as 0/1 needed Boolean logic… for transistor inputs/outputs

7 Binary Logic and Truth Tables
Predicting and calculating outputs for transistor combinations could use Boolean Algebra… could use truth tables with results already calculated Overview:

8 Binary Logic and CPU Design
If memory and data are binary (0/1)… processing must be binary as well! Transistors need to be wired together to make a binary data processor (or CPU) Overview: 8

9 Number Systems (binary and others)
Number of different symbols… “base” of number system many tried over the years Examples: base 2: binary (2 symbols) base 10: decimal (10 symbols) base 12: (inches in a foot, etc. flawed… only 10 symbols) base 16: hexadecimal (16, and 16 symbols) Nystrom (1859!)

10 Logic and Digital Logic
“Logical”… through mental activity (human CPU?) (Mr Spock) “Emotional”… following “gut feeling” Now add “digital” specific type of logic required to program a CPU!

11 Some Definitions… binary digit bit 0 or 1 byte: a group of 8 bits
(nibble: a group of 4 bits) “word”: a group of bits of a fixed length actual length of a word depends on the register size in a CPU 11

12 Number Theory: what does decimal 2314 mean?
Thousands Hundreds Tens units 10x10x10 10x10 10 103 102 101 100 bracket form: (2 x 103) + (3 x 102) + (1 x 101) + (4 x100 ) most significant digit 2  least significant digit 4 12

13 Counting in Binary… Same logic as decimal (denary) system Two symbols
When both symbols used start another column…

14 Counting in Hexadecimal
16 symbols 0-9 plus A-F Same logic as decimal or binary Why bother? represents a nibble as a single symbol!

15 What does binary 1101 mean? 1 1 0 1 2x2x2 2x2 2 1 23 22 21 20
  2x2x2 2x   bracket form – for conversion...   (1 x 23) + (1 x 22) + (0 x 21) + (1 x20 )   = 13 in denary (decimal) 15

16 Binary representation of the 8 bits: 1011 0101
      = 181 Q. How many different binary numbers can an 8 bit word hold? A (= 28) ranging from to 16

17 “Significance” of a bit
All bits aren’t equal! As with decimal, the greater the value… the more significant it becomes e.g. decimal 13821 1 in 10000s column… has much greater value than 1 in the 1s column

18 What about a 16 bit number (a) To what decimal number is it equal? (b) What is the value of the most significant bit? (c) How many different 16 bit binary numbers can be represented? 18

19 The 16 bit number (a) To what decimal number is it equal? Answer: = 53 (b) What is the value of the most significant bit? Answer: 0 (c) How many different 16 bit binary numbers can be represented? Answer: 216 = (which is 64 k) 19

20 Shorthand Rows of many 1s and 0s can be very confusing
easy to make mistakes Solution: divide into blocks of 4 digits (nibbles) use hexadecimal equivalent for each nibble very useful in hard disk analysis, when searching for data 20

21 Hexadecimal notation Decimal Binary Hexadecimal 0 0000 0 1 0001 1
21

22 Hexadecimal notation Decimal Binary Hexadecimal 10 1010 A 11 1011 B
F 22

23 Notation Useful to know what type of number we are dealing with e.g. “110” use subscript at the end 11010 = 110 (denary) 1102 = 110 (binary) = 6 (denary) 110H or = 110 (hexadecimal) = 272 (denary) So now you know! 23

24 Binary Logic & CPU Binary logic + Boolean algebra
logic gates mathematically predictable effects of combining them documented as truth tables Problem: valves wired together produce very large, energy hungry logic gates: CPU large, use a lot of energy!

25 Transistors Same effect as valves Wonderful discovery much smaller
use much less energy Wonderful discovery very exciting for Shannon? computers could be much smaller than he expected…

26 Effects of Miniaturisation
Transistors first used in radios very popular with 1950s “teenagers” Took some time to become part of more sophisticated devices breakthrough: integrated circuits (ICs) many transistors on a single component first IC with enough transistors to be a CPU with programmed instructions… Intel (1972)

27 Now, let’s make a Computer
… or at least the CPU (millions of transistors) Ultra Sparc 1 Pentium 4 Opteron 21364 Itanium 2 McKinley

28 Computer Program (Code)
CPU with INPUT & OUTPUT Computer Program (Code) 1 do this… 2 do that 3 now this 4 goto 1 CPU Memory VDU Plus Data… Keyboard

29 So THAT’S how they work!?  Next week: Structure of a CPU and programming it!


Download ppt "COMP 1321 Digital Infrastructure"

Similar presentations


Ads by Google