Summary

This document appears to be a prelim exam or study guide for a computer architecture course, covering topics like number systems (decimal and binary), character codes (ASCII, ISCII), and computer memory.

Full Transcript

ComArch Prelims (American Decimal Number System-10 digits (0-9) ,...

ComArch Prelims (American Decimal Number System-10 digits (0-9) , ASCIII Standard Code for Info Interchange) positional value system the complete set of characters or symbols divide no by the base you want to convert are called alphanumeric codes · Binary System -7 bit code easiest way to vary instructions thro has 128(27) possible codes - - Electric signals - on loff · 26 Upper Case · 10 digits each digit is called bit 27 lower case 7 punctration marks - : · a also positional value 20 40 opecial characters · a · to 65 - > A to 90 - 2 110102 (x2" + |x23 + 0x2" (x2 0x20 97 + = + - > a + ol22 + z = 16 + 8 + 0 + 2 + 0 = 26 ,0 IS(1) (Indian Script Code for Info Interchange) Computer memory is measured in terms of support indian languages on computer how many bits it can store - new universal encoding standard called Unicode 1 byte = Obits Unicode 1kb 1024 int'l coding system to be used bytes design = - 1 Mg = 1024 kb with diff. language scripts. 1024 MB 1 6b provides = a unigre for character no every no matter what the platform/program/language. Octal 7268 : 7x82 2x8' + + 648" Binary to Octal = 448 + 16 + 6 10101 - > 010101 : 010 = 2 = 478 , 101 = 5 0 = 258 Hexadecimal Binary to Hexadecimal - A is Equal to 10 ; B = 11 10101 - 00010101 = 0001 = / 27 FB , s = (x(j3 + 7x162 15x16' + 10x168 + 0101 = 3 = = 1023410 1516 Computer Architecture Why study this ? Secondary storage · design better programs , sys. softwares ~ peripheral storage optimize behavior · program evaluate benchmark Processing Unit · understand time price CPU · · , space , brain - Computer Organization - Arithmetic - Logic Unit (ALU) physical aspects of computer systems Control Unit (CV) center · - - nerve · how does a comp work ? Output Unit Computer Architecture communicate data comp to - , users Logical aspects rys Implementation · of. as seen by programmers Measures ofCapacity/speed How i ? Kilo 1kb + K do design computer : · · = a = 1000kb = 1 M Mega · Computer components 1.. Processor interpret/execute prog : · Memory : store datal programs Hertz-clocks per cycle /frequency) Mechanism : transfer data MHz or GHz · Byte-unit storage Input Unit · 1kb = 1024 bytes · Imb = 1 , 048 , 576 byte. Unit 1gb 1 099 Memory 511 627 776 bytes · = , , , , RAM /Random Access Memory) · where progs during Main Memory (RAM) in GB stored is measured - are exe - main memory/primary storage Disk Storage (GB) for large system ROM (read only memory) · special operations for computer - Cache Memory - can be accessed faster than RAM , temporary COM ARCH (Prelims Additionals) Introduction Second Generation : Transistorized Number system-work w/ numbers Computers (1945-1965) Most Common system - decimal IBM 1094/1401 Digital Equipment Corporation · Measures of Capacity / Speed · Univac Kilo-1K · · Mega-1 M Third Generations : Integrated Circuit Giga-1B Computers (1965-1980) Tera-1T IBM 360 · · Peta-1 Quadrillion · DEC PDP-O/PDP 11 Quintilion BUNCH (Burroughs Unisys... ) · Exa-1 NCR · , , · Letta - 1 Sextillion Fourt Generation : ULSI Computers · Yotta - 1 Septillion (1980- ??? ) Very large scale integrated Time circuits Millisecond-1 thousandth of second · a · Nanosecond-1 Billionth"" "Moore's law (1965) Micron-1 Millionth"" " Gordon Moore Intel founder · · , Generation Zero : Mechanical Calcula Contempory Version - ting Machines (1642-1945) · density of silicon chips double Calculating Clock 18 · every mos Pascaling · Difference Engine Rock Law Punced tabulating machines chip plants under construction · card - cost over $2. 51 First Generation : Vacrum Tube Computers (1943 - 1953) Software can do HARDWARE Atanasoft Berry Computer Hardware SOFTWARE · can do ~ Iowa State Univ. Computer Level Hierarchy every virtual machine layer is Level0 : Digital Logic Level · an abstraction of the level below it · digital circuits (chips) computer circuits ultimately gates and wires · · carry out the work. Von Neumann Architecture System Level 6 : User Level · John Von Neumann user interface level stored-program computers · · · Fetch - Decode - Execute Level 5 : High-Level Language Level 3 Hardware Systems · where we interact with Pls · Central Processing Unit (CPU) Main memory system Level 4 : Assembly Level 110 system · Language acts upon assembly language · from Level 5 Leonard Adleman · instructions programmed directly · DNA inventors at this level · travelling salesman Level 3 system Software Level Processor speeds measured in MHz : are · controls executing processes on the Transistors led to second gen of computers system Which were smaller and more reliable · protects system resources control unit controls/coordinates order o execution program instructions of Level 2 : Machine Level IBM 650 first mass produced computer · Instruction Set Architecture (ISA) Difference Engine by Charles Babbage level was an early mechanical calculator Alphanumeric codey complete set of anarac/symbol Level 1 : Control Level control unit · · microprogrammed/hardwired · decode/execute instruction Computer Architecture (MIDTERM) Fractional decimal values Introduction nonzero digits to the right of the deci point. Bit Fractional Decimal to Binary · most basic unit of into in a. 8125 0 to base 2 3000 computer 8125. 6250. 2500 · x2x2 · on/off in digital circuit X2 X2 162501 25000 3000 1 0000 high/low voltage.. , get all whole nos , until decimal part Byte became zeroes 0 11012 eight bits 0 812510 =. · smallest possible addressable unit · of computer storage Hexadecimal 0 - 9 and A-F Word 2610 : 1A16 - contigious of byte · group Binary to Hex Radix 11 01 0100 0110 11 to nex aka base divide into 4 to the left · , add zeroes Positional Numbering System 0011 01010001 1011 ↓ ↓ ↓ ↓ 5836 47. in Decimal 3 51 11 = 351B16 5) x 103 + 8x102 3x10' + 6x10 + + 4x10* 7x102 + Binary to Octal Decimal to Base 3 divide into 3 add left S , zeroes to the Oll %lo Example : 190 to Base 3 100 011 Oll 340 ↓ ↓ ↓ ↓ ↓ Eid 32 433 = 324338 190 = 2100ls Octal was very useful in SIX-BIT WORDS , read bottom to top Signed Integer Representation Signed Magnitude Two's Complement + 3 is : 00000011 Radix complement of binary numbering system - 3 is : 10000011 example overflow = to erroneous result 00000011 61 One's complement : 11111100 S2 Add one 1111110 Signed Magnitude is :. : · easy for people to understand J3. Discard any carries requires complicated computer hardware · Booth's Algorithm disadvantage allows I different represen- carrier out multiplication faster · · : , more fations for zero , +01-0 accurate than pencil-pen method · Andrew Donald Booth (1950) For these in Booth's Algo reasons , computer systems : Complement Systems for numeric in the multiplier replace the first + in the · employ , value representation string of 1s in the multiplier with a subtraction in the multiplicant. Diminished Radix Complement System add the multiplicant · negative value is given by the difference of absolute value and one less than its base example 01011 One's complement YO1110 flip all zeros and ones · then signed magnitude 1 as negative Overflow and Carry · , difference : adding the minuend to the nothing in the context of unsigned numbers , instead overflow complement of the subtrahend carry flag of an when having add it after if carry out of the leftmost bit occurs wh an a carry just · , unsigned number overflow occured , · both independent Binary Arithmetic Operation Millisecond = 1k of second Multiplication · Nanosecond 1b · = of second ~ Micron = 1m of a mater 1011 1010 x11 x 111 Serial Ports - data as a series of 111011 , 1018 pulses along one or two data lines + 1011 , 1010 100001 1010 parallel ports - single pulses along 100 0 110 at least 8 data lines Division 11 11001 Universal Series Bus (WSB) - Self-configuring 11/10*1011 181111118 Th (plug and play) 10 101 Standard Organizations · the Institute of Electrical and Electronics 81 Engineer (IEEE) promotes the interests > - of worldwide engineering community Addition · International Telecommunications Union (ITU) 1001 ! telecommunications systems data - , + 1010 + 1001 comms and telephony International Organization for standardization · (150) - worldwide standards for everything Subtraction III 1 % 81 R - 101 10110 111 - - O 0010 I Floating - Point Representation IEEE-754 Single Precision Institute of Electrical and Electronics ⑦ Engineer (IEEE). sign I mantissa exponent · bias of 127 8 bit exponent · floating-point number have 3 Fixed-size Fields : an exponent of 255 indicates a special value sign-exponent significant significant if = value is I infinity · zero - , ↓ ↓ ↓ · if significant : nonzero , value is NaN sign range of valves precision of representation Double Precision Standard lEEE-754 Single Precision · bias of 1023 O bit 23 bit significant 11 bit exponent · · exponent · IEEE-754 Double Precision example · 11 bit exponent · 52 bit significant ~ 12. 75 to lEEE-754 single precisio I as negative sign · sign preceded by an implied binary point : 12p : 1100 15 /l significant fractional binary values: · : exponent power of 2 which significant is raised : - 1100 Il. l , =turn to si a example 3) 20 in 14-bit floating 130, 10000010 = point · 32 is 25 1100000101001000000000000000 1 0 25 0 1x2" 000 0 binary notation 32 = = x · :.. Overflow Bias no room to store high-order bits number approximately midway in the range of values expressible by the exponent Under flow · subtract bias from the value in the value is too small to store exponent to determine true value When discussing floating-point numbers ASCII it's important to understand the: American standard code for Info Interchange , RANGE - 7 Bit difference between largest / smallest values ACCURACY Unicode how close value 16 Bit system - to the true ↑ RECISION -6 parts how much into we have about a value - Western alphabet codes are the 1st parts To test floating point value for equality , Error Detection and Correction to some other numbers first figure out The last character of UPC barcodes and , now close one number can be to ISBNs are check digits be equal. Call this value EPSICON. Cyclic Redundancy Chocking (CRC) Character Codes provide error detection for large blocks of data Binary-coded decimal (BCD) ~ one of early codes Checkorms and CRCs are examples of IBM mainframes systematic detection ~ error - 1950 (1960 Systematic Error Detection in 1964 , BCD of error control bits appended - was extended to 0 bit code to the , group , Extended Binary-coded Decimal Interchange end of the block of transmitted data Code (EBODIC) one of first widely used computer codes Syndrome - upper/lowercase characters group of bit · EBCDIC/BCD are still in use by IBM mainframes Reed-Soloman Codes Conclusions correcting Hexadecimals formed using 4-bit · codes · error are - corrects burst error , occurs when a groups called nibbles series of adjacent bits damaged Floating point operations not necessarily · are are c. g. CD-ROM Commutative/distributive CRC Reed-soloman Hamming · , , codes Hamming codes are 3 important error control ardes words formed by adding redundant check bits bits or parity to a data word Hamming distance between two codes is number of bits in which to codes differ 2. 9. - hamminga b , or the minimum hamming · distance for a code is the smallest hamming distance between all pairs of words , it determines error To detect k( or fewer) single bit errors , the code must have a hamming distance of ) & (min) = k + 1. Hamming distance is provided by adding Suitable bits number of parity to a data word Introduction * Boolean function has atleast one : · Boolean variable - George Book Boolean Operator · 19th cent input from the set 20 , 13 philosopher/mathematicians · · How dare anyone suggest that human ↑ recedence thought could be encapsulated and manipulated 1. Not 3. Or like an algebraic formula 2. And Books Law of Thought Digital Computers implemented in computers today contains computers having boolean functions, · John Atanasoff/Claude Shannon the simpler , the smaller circuit. were first to see this Simpler Circuits Computers cheaper , less power , faster than complex thinking machines/electronic · brains logic Gates Boolean Algebra Gate mathematical sys for manipulation of variables digital computer circuits that can have I values - electronic device , results based on two · formal logic : true/false or more input values · digital sys : on /off, 110 , high/low 3 Simples Gates " Expressions El Y ** Do- Common Bookan x- AND OR , NOT · , AND OR NOT Ripple-Carry Adder XOR - Dit of ripples from adder carry one true if inputs differ , Useful in parity/adders XQY Integrated circuits (12) D X Y 00 commonly ~ more called Yo can be grouped into families accd - to transistors("gates". NAND " - negated and , opposite" and "IDo NOR negated OR opposite of Op - , =)] Universal Gates NAND / NoR inexpensive to manufacture · Combinational Circuits produce specified output at instant , · a when values are applied Half Adder Full Adder finds of 2 bits wIcarry infort · sum COMARCH (FINALS) File and Disk Handling INT 21H/3CH create file · Common Dos File Handle Services AH = 3 CH DS : DX = points to ASCII2 string INT 21H/39H CX = attribute create subdirectory · #H-39H File Attributes DS : DX = points to ASC112 BIT ATTRIBUTE if CX & = 1 , AX has error Read Only I Hidden File INT 21H/3AH 2 System File 3 remove subdirectory Volume Label · note can't delete the current (active Subdirectory : · directory. Archive File AH : BAH DS : DX = points to ASCII2 String INT 21H/43H IF CX 1 AX has get/set file attribute : error · , · requires address of an ASCII string INT 21H/56H rename file or directory INT 21 H/3BH Drive if used must be the change directory · numbers · , , Jame in both strings AH = 3 BH if CX = 1 , AX has error INT 21H/5BH Files create NEW file Modes of Accessing · a if only DNE Access Mode Means · name to not overwrite existing file 8 Read only · use an 1 Write only 2 Both INT21H/3DH Pop Instruction open file · · takes out data from stack AH 3 DH = AL = MODE Format push/pop regly INT 21H/3EH · compact (one byte) version designed close file & pecifically for registers · #H = 3 EH EX = file handle push/pop reg 32 if CX = 1 , AX has error · push/pop an 80386 32 bit general purpose register INT 21A/41H delete file push/pop · segreg not read only · push/pop an 00x86 segment register Designing Programs Using Procedure pop memory · push/pop contents of location memory Defining Procedure a defined ENDP directives Loop Instruction by PROC and - don't generate machine language looping · · instructions rather to assembler number of loops depends value of · , on CX register each time executed , CX is decremented Calling procedure · a , to stops when O call a procedure Basic Stack Instruction Push Instructions putel places data onto stack segment · Control Structure and Procedure Designing Programs Using Procedure Procedures · breaks large program down into smaller pieces to work correctly w/ reference to · of the others any Defining a Procedure every product defined using PROC and · ENDP directives · PROC and ENDD are directions to the assembler Translating high-level structures : Comparison of C to Assembly Language

Use Quizgecko on...
Browser
Browser