Top Banner

of 29

2 Hardware-Concepts-CS101.ppt

Mar 10, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • CS101: Introduction to ComputingInstructors: Dr. Fawad Hussain, Dr. Rashad Jilani, Dr. Saima Jabeen, Mr. Gibrail Islam & Dr. Ahmar Rashid.

    Faculty of Computer Science and Engineering

    GIK Institute of Engineering Sciences and TechnologyFall 2014

  • Data Representation

  • Data RepresentationModern computers are digital devicesA digital device works with discrete data, such as the digits 1 and 0An analog device works with continuous data

    Just as a standard light switch is a simpler technology than a dimmer, so is digital when compared to analogdigitalanalog

  • Number SystemWe use decimal number system [base 10] when representing numeric values in our daily lifeE.g., consider the number 123123 = 100 + 20 + 3 = 1*102 + 2 * 101 + 3*100Most modern computer systems do not use the decimal system to represent numeric values. Instead, they use a binary numbering system [base 2]Consisting of only two digits: 1 and 0Uses powers of 2 rather than 10It is said that there are 10 types of people: those who understand binary, and those who dont !

  • ConversionsConversion from binary to decimal:(1011)2 = 1*23 + 0*22 + 1*21 + 1*20 = (11)10Conversion from decimal to binary:

    2009 Pearson Education, Upper Saddle River, NJ 07458. All Rights ReservedFloyd, Digital Fundamentals, 10th ed

    Binary ConversionsYou can convert a decimal whole number to binary Sum-of-Weights Method . Write the decimal weight of each column and place 1s in the columns that sum to the decimal number.Convert the decimal number 49 to binary.The column weights double in each position to the right. Write down column weights until the last number is larger than the one you want to convert.26 25 24 23 22 21 20.64 32 16 8 4 2 1. 0 1 1 0 0 0 1. Sum-of-Weights Method

  • Some decimal values & their binary equivalents

    In addition to numeric data, computers also manipulate character datanumbers, symbols, numerals that are not used in arithmetic operationsTo represent them, codes have been developed that specify binary equivalent for each characterASCII (American Standard Code for Information Exchange)7 bits [Example table given ]Extended ASCII 8 bitsEBCDIC (Extended Binary-Coded Decimal Interchange Code)8-bit character encoding used mainly on IBM mainframe and IBM midrange computer OSUnicode- 16 bitsSounds and pictures must be transformed into a format the computer can understandA computer must digitize colors, notes, and instrument sounds into 1s and 0sRepresenting Non-Numeric Data

    CharDecimalEBCDICUnicodeASCIIBinaryA651930041100 0001B661940042100 00100482400030011 00001492410031011 0001$36910024010 0100

  • Quantifying Bits and BytesA bit is one binary digit (b): can have value either 0 or 1A byte is 8 bits (B)0010 0100Kilo- means a 1000; Mega- means million; Giga -means billionKilobit (Kb) is 1,024 bitsKilobyte (KB) is 1,024 bytesMegabyte (MB) is 1,048,576 bytesGigabyte (GB) is 1,073,741,824 bytesTerabyte 240 bytesPetabyte 250 bytesExabyte 260 bytesBits take the form of electrical pulses that can travel over circuitsAlmost the same way as electricity flows over a wire when you turn on a light switch

  • Computer HardwareMicroprocessor MemoryStorage DevicesI/O Devices

  • Computer Chips (-1-)Most electronic components inside a computer are integrated circuitsThin slices of silicon crystal packed with microscopic circuit elementse.g., wires, transistors, capacitors, logic gates and resistersSemiconducting materials are used to fabricate a chipSemidocnductors: Silicon, germanium properties b/w conductor and insulatorTo fabricate a chip, the conductive properties of selective parts of semiconducting material can be enhanced to create very small electronic circuits and components such as capacitorsTypes of chips:DIPs; DIMMs; PGAs; SEC cartridge*The motherboard houses all essential chips and provides connecting circuitry between them

  • Computer Chips (-2-)Dual In-line Memory Module(DIMM)Dual In-line Package(DIP)Pin Grid Array (PGA)Single Edge Contact (SEC)

  • MicroprocessorAn integrated circuit designed to process instructions - CPU on a chip

    The CPU has two partsALU (arithmetic logic unit) Performs arithmetic operationsPerforms logical operationsUses registers to hold data being processedControl Unit Directs and coordinates processing

  • Memory HierarchyMicroprocessorProcesses Instructions, one at a timeRegistersCurrent Instruction + related variables (operator, operand etc, are loaded into registers)CacheAlso know as RAM cache, faster compared to any other memory on the boardLevel 1 Cache (L1): Built into the processor chip, cannot be replaced without replacing the processorLevel 2 Cache (L2): Located on a separate chip and takes a little bit more time to get data to processorRAMLoad whole programs, operating system, etc. into memoryVirtual MemoryIf memory is full, part of the current program can be swapped in and out of the memory from/to hard diskHard DiskOffline programs, data and etc.

  • http://www.pantherproducts.co.uk/index.php?pageid=cpucachebook would be returned to the shelf. When the next person arrives and asks for Lord of the Rings, the same process happens and takes the same amount of time.

  • Random Access Memory (RAM)A temporary holding area for data, application program instructions, and the operating systemAs you type, characters are held in RAM

    RAM is primary storage (main memory)Measured in megabytes (MB) or gigabytes (GB)

    Todays computers have between 1 GB and 16 GB of RAM depending on software you useYou can purchase additional RAMA computer can use disk storage to simulate RAM. This is called virtual memoryNot as fast as RAM

  • Types of RAMRAM components vary in speed, technology, and configurationSDRAM (Synchronous Dynamic RAM)RDRAM (Rambus Dynamic RAM)a serial memory technology, more expensive compared to SDRAMOriginally developed for game systems: Nintendo 64, Sony Play Staton 2. Used to be sole choice of memory for Intel's Pentium 4DDR (Double data rate)DDR basically doubles the rate of data transfer of standard SDRAM by transferring data on the up and down tick of a clock cycleDDR2provides 4 data transfers per cycleCompatible with a bunch of motherboards, used to install Intel P4, and some AMD processors.http://www.spectek.com/menus/mthrbrd.aspx?mfgName=ASUS&memType=DDR2 DDR3provides 8 data transfers per cyclecompatible with X58 motherboard chipset used for Core i7 processorsSpeed is measured in nanoseconds.1 nanosecond (ns) is 1 billionth of a secondIt can also be expressed in MHz (millions of cycles per second)

  • Other Types of MemoryRead-Only Memory (ROM)Type of memory circuitry that holds the computers startup routineROM contains a small set of instructions called the ROM BIOS (basic input/output system). These instructions tell the computer how to access the hard disk, find the operating system and load it into the RAMPermanent and non-volatileOnly way to change the instructions on a ROM chip is to replace the chipAdditionally, a computer needs a semi-permanent way of keeping boot dataCMOS memory holds data but requires very little power to retain its contentsRetains important computer settings after you turn the power offCan be run by a battery on the motherboardCMOS holds computer configuration settings such as the date and time, hard disk capacity, RAM capacity and etc.To access the CMOS setup program, hold down the F1 key during PC bootup

  • Storage DevicesA storage medium is the disk, tape, CD, DVD, paper or other substance that contains dataA storage device is the mechanical apparatus that records and retrieves data from a storage mediumTypes of storage devicesMagnetic StorageOptical StorageSolid State Storage

  • Magnetic StorageStores data by magnetizing microscopic particles on the disk or tape surfaceContains a read-write head mechanism in the disk drive that reads and writes magnetized particles that represent dataBefore data is stored, the particles on the surface of the disk are scattered in random patterns. The disk drives read-write head magnetizes the particles and orients them in a positive (north) or negative (south) direction. These patterns of magnetized particles represent 0 or 1.ExampleHard Disk Drive [HDD]Floppy DiskMagnetic Tape

  • Magnetic Storage : HDDWorking of a hard diskHard disk platter - a flat, rigid disk made of aluminum or glass and coated with magnetic iron oxide particlesHard disk - one or more platters and their associated read-write headsCapacity up to 250 GB (even more today); Preferred type of main storageR/W HeadPlatterLimitationsHead crash - when a read-write head runs into a dust particle or other contaminant on the diskHead crash damages some data on diskTriggered by shaking the hard disk while in useNot limited to hard disks

  • Optical StorageStores data as microscopic light spots (lands) and dark spots (pits) on the disk surfaceThe lands represent 1 and the pits represent 0 in binary computingAdvantageLess susceptible to environmental damage than data recorded on magneticmedia ExampleCD [Capacity: 700 MB] DVD [Capacity: 4.7 GB; Double Layered can store up to 8.5 GB]Blue-Ray [Capacity: up to 50 GB ]

  • Optical Storage : CD / DVDWorking of CD / DVDRecordable technology uses a laser to change the color in a synthetic dye layer sandwiched beneath the clear plastic disk surfaceRewritable technology uses phase change technology to alter a crystal structure on the disk surfaceuses a phase change process to alter its state from a reflective state to a light absorbing state rather than an irreversable chemical change as in cyanine-based CD-RMuch slower than hard diskNot a suitable replacement for hard disk yet

  • Solid State StorageStores data in a non-volatile, erasable, low-power chip Some solid state storage requires a device called a card reader to transfer data to or from a computerWorkingThe chips circuitry is arranged as a grid, and each cell in the grid contains two transistors that act as gates. gates open current flows a 1 bitgates closed no current a 0 bitAdvantageProvides faster access to data than magnetic or optical storage technology because it includes no moving partsPortableExampleUSB flash driveCompactFlash card

  • Moores Law:An Important Observation (-1-)Moore's lawdescribes a long-term trend in thehistory of computing hardware

    Since the invention of theIC in 1958, the number oftransistorsthat can be placed inexpensively on anIChas increasedexponentially, doubling approximately every two years

  • Moores Law:An Important Observation (-2-)

  • Moores Law:

  • ReferencesComputer Concepts, by Parsons & Oja [Chapters 2]http://en.wikipedia.org/wiki/ASCIIhttp://en.wikipedia.org/wiki/Moore's_lawhttp://www.google.com.pk/imgres?q=moores+law&hl=en&sa=X&biw=1366&bih=565&tbm=isch&prmd=imvnsu&tbnid=cJCMmCj7UsiHOM:&imgrefurl=http://www.ieee.org/portal/site/sscs/index.jsp%3FpageID%3Dsscs_level1_article%26TheCat%3D6010%26path%3Dsscs/06Sept%26file%3DHalfhill.xml&docid=VOgwV-8TrJwmMM&w=800&h=600&ei=lsBwTv2_HcubOpqusJ0J&zoom=1

    ***