lec1-unix - ECE 175 Computer Hardware Main Memory...

Info iconThis preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE  175
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Computer Hardware 05/12/09 ECE 175, Fall 2007 2 Unit (CPU) Input/Output Devices Main Memory Mass storage Communication Device
Background image of page 2
Computer Software Operating System:   Software for managing  coordinating the hardware  resources Peripheral Control:   Software for I/O with CPU  (drivers) Memory Management:   Manage the system  memory Software Management:   Manage processes,  priorities, multitasking 05/12/09 ECE 175, Fall 2007 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
We write programs using user-friendly programming  languages E.g :  #include <stdio.h>  main() { printf (“Your first C program"); } Program is translated to ones and zeros ( machine  code ) 0 1 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 0 1 0 1 0 1 1  1 0  Hardware performs arithmetic operations on bit  sequences and returns the result 05/12/09 ECE 175, Fall 2007 4
Background image of page 4
Binary Arithmetic Numbers are represented using only zeros and ones.  Example 0 0 1 1 0 1  =  1x2 0  + 0x2 1  + 1x2 2  + 1x2 3  + 0x2 4 +0x2 5  = 13 (decimal) Why Binary? Easy representation using electronic circuitry Example 05/12/09 ECE 175, Fall 2007 5 switch current switch current
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Magnetic Disks (hard drives) Compact Disks (CDs) 05/12/09 ECE 175, Fall 2007 6 Magnetic Cells Magnetic Orientation A one is produced every time a pit edge is met pit
Background image of page 6
Bit Addition Summing two numbers Representation of negative numbers 05/12/09 ECE 175, Fall 2007 7 Bit 1 Bit 2 Sum 0 0 0 0 1 1 1 1 0 1 1 0 0 1 + 1 1 1 0 1 1 1 0 1 1 0 25 + 29 54 1 1 1 0 0 1 Most Significant Bit (MSB) represents sign
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
MSB is used for sign, only seven bits are left to  represent numbers Range: 1 1 1 1 1 1 1 1 to 0 1 1 1 1 1 1 1 that is -128 to  127 Subtraction: x – y = x + (- y) Two’s Complement: A neat way of representing  negative # To find the two’s complement (negative) of a number x Step 1: Invert zeros to ones and ones to zeros Step 2: Add number one 05/12/09 ECE 175, Fall 2007 8 0 1 1 0 1 1 1 1 0 0 1 0 0 + 1 Step 1: Step 2: Two’s Complement 51
Background image of page 8
An example of subtraction: 33 – 51 = 33 + (- 51) = - 18  05/12/09 ECE 175, Fall 2007 9 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 0 0 0 1 0 0 1 0 - 18  + Two’s Complement of 51 Two’s Complement of 18 MSB Note: If result were to be positive no need to compute two’s complement, only negative numbers are represented with the two’s complement.
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Consider the smallest negative number that can be  represented (for 8-bits: - 128) Why is that? No representation of128, range is from -128 to 127 05/12/09 ECE 175, Fall 2007 10 1 0 0 0 0 0 0 0 + 1 1 0 0 0 0 0 0 0 - 128  0 1 1 1 1 1 1 1
Background image of page 10
Consider 8-bit numbers What if addition(subtraction) gives a number > 127 05/12/09 ECE 175, Fall 2007 11 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 0 + 1 Carry x (15) (-5) (10) 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 0 1 0 + Carry (111) (123) (-22) Wrong result
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/06/2008 for the course ECE 175 taught by Professor Grubbs during the Fall '08 term at University of Arizona- Tucson.

Page1 / 33

lec1-unix - ECE 175 Computer Hardware Main Memory...

This preview shows document pages 1 - 13. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online