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

Slides:



Advertisements
Similar presentations
Slides created by: Professor Ian G. Harris Efficient C Code  Your C program is not exactly what is executed  Machine code is specific to each ucontroller.
Advertisements

How to Convert Decimal Numbers to Binary EXAMPLES.
Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 2: IT Students.
IT253: Computer Organization Lecture 6: Assembly Language and MIPS: Programming Tonga Institute of Higher Education.
1 Lecture-2 CSIT-120 Spring 2001 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Computer Organization and Architecture Tutorial 2 Kenneth Lee.
1 Lecture-2 CS-120 Fall 2000 Revision of Lecture-1 Introducing Computer Architecture The FOUR Main Elements Fetch-Execute Cycle A Look Under the Hood.
How Computers Work Part 2 20 September About the Term Project  Your paper must take a position and be a proponent for it  Your presentation must.
Computer Architecture
CS 300 – Lecture 6 Intro to Computer Architecture / Assembly Language Instructions.
Instruction Set Design by Kip R. Irvine (c) Kip Irvine, All rights reserved. You may modify and copy this slide show for your personal use,
Computer Architecture and Organization Introduction.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Chapter 1 Introduction. Architecture & Organization 1 Architecture is those attributes visible to the programmer —Instruction set, number of bits used.
Von Neumann Machine Objectives: Explain Von Neumann architecture:  Memory –Organization –Decoding memory addresses, MAR & MDR  ALU and Control Unit –Executing.
CS 111 – Sept. 15 Chapter 2 – Manipulating data by performing instructions “What is going on in the CPU?” Commitment: –Please read through section 2.3.
CS 232: Computer Architecture II Prof. Laxmikant (Sanjay) Kale.
1 7-7 Register-Cell Design A single-bit cell of an iterative combinational circuit connected to a flip-flop that provides the output forms a two-state.
Computer Structure & Architecture 7b - CPU & Buses.
CO UNIT-I. 2 Multiplexers: A multiplexer selects information from an input line and directs the information to an output line A typical multiplexer has.
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
An Example Architecture. A Paper Computer - Woody Woody's characteristics Word size – 8 bits One word.
ICC Module 3 Lesson 1 – Computer Architecture 1 / 6 © 2015 Ph. Janson Information, Computing & Communication Computer Architecture Clip 3 – Instruction.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
1 3 Computing System Fundamentals 3.2 Computer Architecture.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Program to multiply 2 numbers 500-Input x 291-Store acc. as x 500-Input y 292-Store acc. as y 193-Load y in to acc. (0 on 1 st parse) 391-Add x to acc.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Computing Science Computer Structure: Lesson 1: Processor Structure
The Little man computer
How do Computers Work ?.
Immediate Addressing Mode
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
CPU Organisation & Operation
A Closer Look at Instruction Set Architectures
COMPUTER ARCHITECTURE & OPERATIONS I
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
Design of the Control Unit for Single-Cycle Instruction Execution
The fetch-execute cycle
The Processor and Machine Language
CSCI206 - Computer Organization & Programming
Functional Units.
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
8086 Ahad.
Topic 5: Processor Architecture Implementation Methodology
Architecture Overview
Sequencing, Selection, and Loops in Machine Language
Topic 5: Processor Architecture
Classification of instructions
How Computers Store Data
A Closer Look at Instruction Set Architectures Chapter 5
Branch instructions We’ll implement branch instructions for the eight different conditions shown here. Bits 11-9 of the opcode field will indicate the.
A Closer Look at Instruction Set Architectures
Instruction encoding The ISA defines Format = Encoding
How Computers Work Part 1 6 February 2008.
Instruction encoding The ISA defines Format = Encoding
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Introduction to Computer Architecture
GCSE OCR 1 The CPU Computer Science J276 Unit 1
CS 286 Computer Organization and Architecture
Instruction encoding The ISA defines Format = Encoding
Review: The whole processor
CPU Structure CPU must:
Computer Organization & Compilation Process
Arithmetic Circuits.
Systems Architecture I (CS ) Lecture 5: MIPS Instruction Set*
Parts of the Computer
Presentation transcript:

source: http://thinkgeek.com

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?

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

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!

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

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 http://logic.ly by Josh Tynjala

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

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

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

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

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

choosing 1 bit out of 4 Set selectors to: 00

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

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

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

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

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

How many layers of multiplexers?

(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

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

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

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

Dilbert by Scott Adams, May 8 2005

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!