34 Pages

chapter5-datapath02

Course: MR 310, Spring 2010
School: Shanghai Jiao Tong...
Rating:
 
 
 
 
 

Word Count: 1139

Document Preview

Carry Manchester Chain Digital IC 1 Carry-Skip Adder Carry-ripple is slow through all N stages Carry-skip allows carry to skip over groups of n bits Decision based on n-bit propagate signal A16:13 B16:13 A8:5 B8:5 A4:1 P16:13 Cout A12:9 B12:9 P12:9 P8:5 P4:1 1 0 C12 + S16:13 1 0 C8 + S12:9 Digital IC 1 0 C4 + S8:5 B4:1 1 0 + Cin S4:1 Slide 2 4/16 bit Block Carry Skip Adder bits 12 to...

Register Now

Unformatted Document Excerpt

Coursehero >> China >> Shanghai Jiao Tong University >> MR 310

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Carry Manchester Chain Digital IC 1 Carry-Skip Adder Carry-ripple is slow through all N stages Carry-skip allows carry to skip over groups of n bits Decision based on n-bit propagate signal A16:13 B16:13 A8:5 B8:5 A4:1 P16:13 Cout A12:9 B12:9 P12:9 P8:5 P4:1 1 0 C12 + S16:13 1 0 C8 + S12:9 Digital IC 1 0 C4 + S8:5 B4:1 1 0 + Cin S4:1 Slide 2 4/16 bit Block Carry Skip Adder bits 12 to 15 bits 8 to 11 bits 4 to 7 bits 0 to 3 Setup Setup Setup Setup Carry Propagation Carry Propagation Carry Propagation Carry Propagation Sum Sum Sum Sum Worst-case delay carry from bit 0 to bit 15 = carry generated in bit 0, ripples through bits 1, 2, and 3, skips the middle two groups (B is the group size in bits), ripples in the last group from bit 12 to bit 15 Tadd = tsetup + B tcarry + ((N/B) - 1) tskip +(B-1) tcarry + tsum Digital IC Ci,0 70 RCA, Carry Skip Adder Comparison 60 50 40 RCA CSkA 30 20 10 B=2 B=4 B=3 B=5 B=6 0 8 bits 16 bits Digital IC 32 bits 48 bits 64 bits Carry-Skip PG Diagram 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 G4:0 G4:1 P4:1G0:0 G8:0 G8:5 P8:5G4:0 G12:0 G12:9 P :9G8:0 12 G16:0 G16:13 P :13G12:0 16 Gi: j Gi:k Pi:k Pi: j Pi:k Gk 1: j Pk 1: j 16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 tskip Digital IC Slide 6 Carry-Skip PG Diagram 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 G4:0 G4:1 P4:1G0:0 G8:0 G8:5 P8:5G4:0 G12:0 G12:0 P :9G8:0 12 G16:0 G16:13 P :13G12:0 16 16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 tskip t pg 2 n 1 (k 1) t AO txor Digital IC Slide 7 Carry-Skip PG Diagram P.CHAN and M.Schlag,Analysis and design of CMOS Manchester adders with variable carryskip IEEE Trans.Computers,Vol.39,No.8,Aug.1990,pp.983-992 G4,0 G4,1 P4,1 G0,0 Digital IC 8 Variable Group Size 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Delay grows as O(sqrt(N)) Digital IC Slide 9 LookAhead - Basic Idea A0, B0 Ci,0 A1, B1 P0 Ci,1 S0 ??? P1 S1 AN-1, BN-1 Ci, N-1 ??? PN-1 SN-1 C o k = f A k B k Co k 1 = Gk + P kCo k 1 Digital IC 10 Look-Ahead: Topology Expanding Lookahead equations: VDD G3 C o k = Gk + Pk Gk 1 + Pk 1Co k 2 G2 G1 All the way: G0 C o k = Gk + Pk Gk 1 + P k 1 + P1 G0 + P0 Ci 0 Ci,0 Co,3 P0 P1 P2 P3 Digital IC 11 Carry-Lookahead Adder Carry-lookahead adder computes Gi:0 for many bits in parallel. Uses higher-valency cells with more than two inputs. G8:0=G8:5+P8:5G4:0 A16:13 B16:13 Cout G16:13 P16:13 + S16:13 C12 A12:9 B12:9 G12:9 P12:9 + S12:9 A8:5 B8:5 C8 A4:1 C4 G8:5 P8:5 B4:1 G4:1 P4:1 + + S8:5 Cin S4:1 t cla = t pg + t pg( n ) + [(n -1) + (k -1)]t AO + t xor Digital IC Slide 12 CLA PG Diagram 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 13 Carry-Select Adder Trick for critical paths dependent on late input X Precompute two possible outputs for X = 0, 1 Select proper output when X arrives Carry-select adder precomputes n-bit sums For both possible carries into n-bit group G8:0=G8:5+P8:5G4:0 A16:13 B16:13 A12:9 B12:9 0 + Cout + 0 + C12 1 1 + Digital IC A4:1 B4:1 0 C8 1 + C4 + Cin 0 S12:9 B8:5 + 1 0 1 0 1 S16:13 A8:5 S8:5 S4:1 Slide 14 Carry-Increment Adder 15 14 13 12 11 10 13:12 8 7 6 9:8 14:12 15:12 9 4 3 2 1 G12:9 0 C8 5:4 10:8 11:8 5 P12:9 6:4 7:4 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 G12:0=G12:9~P12:9+P12:9C8 G12:0=G12:9+P12:9C8 16:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 15 G12:0=G12:9~C8+(G12:9+P12:9)C8=G12:9+P12:9C8 A12:9 B12:9 + 0 + 1 0 1 S12:9 Digital IC 16 Carry-Increment Adder Factor initial PG and final XOR out of carry-select 15 14 13 12 11 10 13:12 8 7 6 9:8 14:12 15:12 9 4 3 2 1 0 5:4 10:8 11:8 5 6:4 7:4 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 tincrement Digital IC Slide 17 Carry-Increment Adder Factor initial PG and final XOR out of carry-select 15 14 13 12 11 10 13:12 8 7 6 9:8 14:12 15:12 9 5 4 3 2 1 0 5:4 10:8 6:4 11:8 7:4 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 tincrement t pg n 1 (k 1) t AO txor t increment = t pg + [t pg( n ) + (k -1)]t AO + t xor Digital IC Slide 18 Variable Group Size 15 14 13 12 11 10 9 12:11 t increment = t pg + 2N t AO + t xor 8 7 6 8:7 13:11 4 5:4 9:7 14:11 5 3 2 1 0 3:2 6:4 10:7 15:11 Also buffer noncritical signals 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 15 14 13 12 11 10 9 12:11 7 6 8:7 13:11 14:11 8 9:7 10:7 5 5:4 6:4 4 3 3:2 2 1 0 1:0 3:0 6:0 15:11 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 19 Carry Select Adder As Precompute the carry out of each block for both carry_in = 0 and carry_in = 1 (can be done for all blocks in parallel) and then select the correct one Bs 4-b Setup Ps 0 carry propagation 0 1 carry propagation Cout 1 multiplexer Cs Sum generation Ss Digital IC Gs Cin Carry Select Adder: Critical Path bits 12 to 15 As Bs bits 4 to 7 As Bs bits 0 to 3 As Bs Setup Ps Gs Setup Ps Gs Setup Ps Gs 1 Setup Ps Gs 0 carry 0 carry 0 carry 0 carry +4 0 1 carry Cout bits 8 to 1 As Bs 1 carry 1 carry 1 carry 1 + ux m1 Cs +1 mux Cs +1 mux Cs + ux m1 Cs Cin + Sum1gen Sum gen Sum gen Sum gen Ss Ss Ss Ss Tadd = tsetup + B tcarry + N/B tmux + tsum Digital IC Square Root Carry Select Adder bits 14 to 19 As Bs bits 9 to 13 As Bs Setup Setup Ps Gs 0 carry +6 Ps 0 carry bits 5 to 8 bits 2 to 4 As Bs Bs Ps 0 +5 0 +4 1 carry +1 mux 1 Setup Ps carry +1 mux +1 mux 1 1 Gs Gs 0 carry bits 0 to 1 As Bs Setup Setup Gs 1 carry Cout As Ps Gs 0 carry 0 +2 +3 1 1 carry +1 mux 1 +1 mux Cs Cs Cs Cs +1 Sum gen Sum gen Sum gen Sum gen Sum gen Ss Ss Ss Ss Digital IC 1 1 carry Cs Tadd = tsetup + 2 tcarry + 2N tmux + tsum 0 0 carry Ss Cin Tree Adder If lookahead is good, lookahead across lookahead! Recursive lookahead gives O(log N) delay Many variations on tree adders Digital IC Slide 23 Brent-Kung* *R.Brent and H.Kung,a regular layout for parallel adders IEEE Trans. Computer, vol. C-31,No.3,March 1982,pp.260-264 15 14 13 12 11 10 15:14 13:12 15:12 11:10 9 9:8 11:8 8 7 7:6 6 5 5:4 7:4 15:8 4 3 3:2 2 1 0 1:0 3:0 7:0 H = 2 log 2 N -1 11:0 13:0 9:0 5:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 24 Sklansky* *J.Sklansky conditional-sum addition logic IER Trans. Electronic computers, vol.EC-9,June 1960,pp.226-231 15 14 13 12 11 10 15:14 13:12 11:10 15:12 14:12 15:8 14:8 9 9:8 11:8 10:8 13:8 8 7 6 7:6 7:4 5 5:4 6:4 4 3 2 3:2 3:0 1 0 1:0 2:0 12:8 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 fanout = [8,4,2,1] Digital IC Slide 25 Kogge-Stone* *P.Kogge and H.Stone,a parallel algorithm for the efficient solution of a general class of recurrence equations IEEE Trans. Computer, vol.C-22,No.8,Aug. 1973,pp.786-793 15 14 13 12 11 10 9 8 7 6 5 4 3 2 15:14 14:13 13:12 12:11 11:10 10:9 9:8 8:7 7:6 6:5 5:4 4:3 3:2 2:1 15:12 14:11 13:10 3:0 1 0 2:0 15:8 14:7 13:6 12:9 11:8 10:7 9:6 8:5 7:4 6:3 5:2 4:1 12:5 11:4 10:3 9:2 8:1 7:0 6:0 5:0 1:0 4:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 26 Tree Adder Taxonomy Ideal N-bit tree adder would have L = log N logic levels Fanout never exceeding 2 No more than one wiring track between levels Describe adder with 3-D taxonomy (l, f, t) Logic levels: L+l Fanout: 2f + 1 Wiring tracks: 2t Known tree adders sit on plane defined by l + f + t = L- 1 Digital IC Slide 27 Tree Adder Taxonomy l (Logic Levels) 3 (7) f (Fanout) 2 (6) 3 (9) 1 (5) 2 (5) 1 (3) 0 (2) 0 (4) 0 (1) 1 (2) 2 (4) 3 (8) t (Wire Tracks) Digital IC Slide 28 Tree Adder Taxonomy l (Logic Levels) 3 (7) Brent-Kung f (Fanout) 2 (6) Sklansky 3 (9) 1 (5) 2 (5) 1 (3) 0 (2) 0 (4) 0 (1) 1 (2) 2 (4) Kogge-Stone 3 (8) t (Wire Tracks) 11: Adders Digital IC Slide 29 Han-Carlson 15 14 13 12 11 10 9 8 7 6 5 4 3 15:14 13:12 11:10 9:8 7:6 5:4 3:2 15:12 13:10 11:8 9:6 7:4 5:2 13:6 11:4 9:2 7:0 1 0 3:0 15:8 2 1:0 5:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 30 Knowles [2, 1, 1, 1] 15 14 13 12 11 10 9 8 7 6 5 4 3 2 15:14 14:13 13:12 12:11 11:10 10:9 9:8 8:7 7:6 6:5 5:4 4:3 3:2 2:1 15:12 14:11 13:10 3:0 1 0 2:0 15:8 14:7 13:6 12:9 11:8 10:7 9:6 8:5 7:4 6:3 5:2 4:1 12:5 11:4 10:3 9:2 8:1 7:0 6:0 5:0 1:0 4:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 31 Ladner-Fischer 15 14 13 12 11 10 15:14 13:12 15:12 11:10 9 9:8 11:8 15:8 13:0 7 7:6 7:0 11:0 6 5 5:4 7:4 13:8 15:8 8 4 3 3:2 2 1 0 1:0 3:0 5:0 9:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 32 Taxonomy Revisited (f)Ladner-Fischer (b) Sklansky 1 5 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 1 4 15:14 15:14 13:12 11:10 9:8 7:6 5:4 3:2 1 3 1 2 15:8 14:8 11:8 10:8 13:8 7:4 6:4 3:0 13:12 LadnerFischer f (Fanout) 11:10 4 3 2 9:8 8:7 7:6 6:5 5:4 4:3 3:2 2:1 15:12 14:11 13:10 9:6 8:5 7:4 6:3 5:2 4:1 3:0 1 15:14 0 (2) 0 2:0 11:8 10:7 13:0 1:0 0 (4) 0 (1) 13:12 11:10 15:12 14:7 13:6 12:5 11:4 10:3 9:2 8:1 7:0 6:0 5:0 4 5:4 3 2 1 3:2 7:4 0 1:0 0:0 1:0 3:0 7:0 11:0 5:0 9:0 9 HanCarlson 9:8 9:0 8:0 7:0 6:0 5:0 4:0 7 8 6 5 4 3 2 7:6 11:8 5:4 3:2 7:4 3:0 2:0 1 0 15:8 1:0 3:0 7:0 New (1,1,1) Knowles [4,2,1,1] 11:0 13:0 15:8 7:6 13:8 15:8 15 14 13 12 11 10 1 (3) 15:14 14:13 13:12 12:11 11:10 10:9 12:9 9:8 15:0 14:0 13:0 12:0 11:0 10:0 2 (5) 5 5 1 (5) (e) Knowles [2,1,1,1] 6 6 (a) Brent-Kung 2 (6) 3 (9) 7 7 3 (7) Sklansky 8 8 11:8 15:8 BrentKung LadnerFischer 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 9 9 l (Logic Levels) 2:0 12:8 15 14 13 12 11 10 1 0 1:0 15:12 15:12 14:12 1 1 0 9:0 5:0 4:0 1 (2) 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 HanCarlson 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Knowles [2,1,1,1] 2 (4) (d) Han-Carlson 15 14 13 12 11 10 (c) Kogge-Stone 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 15:12 14:11 13:10 15:8 14:7 13:6 9:8 8:7 7:6 6:5 5:4 4:3 3:2 2:1 12:9 11:8 10:7 9:6 8:5 7:4 6:3 5:2 4:1 3:0 11:4 10:3 9:2 8:1 7:0 6:0 5:0 1:0 13:12 11:10 9:8 7:6 5:4 3:2 15:12 13:10 11:8 9:6 7:4 5:2 0 3:0 15:8 Kogge3 (8) Stone 2:0 12:5 1 0 15:14 15:14 14:13 13:12 12:11 11:10 10:9 2 13:6 11:4 9:2 7:0 1:0 5:0 4:0 t (Wire Tracks) 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 15:0 14:0 13:0 12:0 11:0 10:0 9:0 8:0 7:0 6:0 5:0 4:0 3:0 2:0 1:0 0:0 Digital IC Slide 33 Summary Adder architectures offer area / power / delay tradeoffs. Choose the best one for your application. Architecture Classification Logic Levels Max Tracks Fanout Cells Carry-Ripple N-1 1 1 N Carry-Skip n=4 N/4 + 5 2 1 1.25N Carry-Inc. n=4 N/4 + 2 4 1 2N Brent-Kung (L-1, 0, 0) 2log2N 1 2 1 2N Sklansky (0, L-1, 0) log2N N/2 + 1 1 0.5 Nlog2N Kogge-Stone (0, 0, L-1) log2N 2 N/2 Nlog2N Digital IC Slide 34 summary Digital IC 35
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Shanghai Jiao Tong University - MR - 310
Digital Integrated CircuitsA Design PerspectiveThe WireThanks for Dr.Guoyong.SHI for his slides contributed for the talkIntroductionDigital ICThe WiretransmittersreceiversschematicsphysicalDigital IC2Interconnect Impact on ChipDigital IC3W
Shanghai Jiao Tong University - MR - 310
Digital IntegratedCircuitsA Design PerspectiveDesigning SequentialLogic CircuitsIntroductionDigital ICDesign Sequential Logic CircuitsIntroductionTimingStatic Latches and RegistersDynamic Latches and Registerssequentional logicDigital IC2Se
University of Maryland - HIST - 428V
Notes 3.11929 Wailing Wall Disturbances/RiotsArgument between the Jews and Muslims over who has access to the wall mostsignificant wall in the worldo The only remaining wall of the ancient temple mounto Where Jews have prayed at since 70 CE when the
University of Auckland - COMPSCI - 101
415.101ACTHE UNIVERSITY OF AUCKLANDEXAMINATION FOR BA BSc ETC 2000COMPUTER SCIENCEPrinciples of Programming(Time Allowed: TWO hours)Surname(Family name):First Name(s)(Given names):Student ID:NOTE: Attempt ALL questions.Write your answers in th
University of Auckland - COMPSCI - 101
415.101ACTHE UNIVERSITY OF AUCKLANDEXAMINATION FOR BA BSc ETC 2000COMPUTER SCIENCEPrinciples of Programming(Time Allowed: TWO hours)Surname(Family name):First Name(s)(Given names):Student ID:NOTE: Attempt ALL questions.Write your answers in th
University of Auckland - COMPSCI - 101
415.101AC 2000 Test SolutionsQ.1 (5 marks)Q.2 (5 marks)public class ApplicEsQ2 cfw_public static void main(String args[]) cfw_int int1, int2;System.out.println("Numbers: ");int1 = Keyboard.readInt();int2 = Keyboard.readInt();if (int1 > 62)cfw_Sy
University of Auckland - COMPSCI - 101
415.101AC 2000Principles of ProgrammingTest:Monday 31st January 3.00pm 4.30pmSurname (Family Name):First Name(s):ID Number:TUESDAY/WEDNESDAYLab Time:Note: Attempt ALL questions. Calculators are NOT permitted.Write your answers in the spaces prov
University of Auckland - COMPSCI - 101
- 11 -415.101FCAnswer bookSURNAME:FORENAMES:DEGREE (BSc, COP, Etc):STUDENT IDENTIFICATION NUMBER:SIGNATURE:Examiner to complete:QuestionMarkQuestion1526374Mark8TOTALANSWER BOOK- 12 -Surname:Forenames:415.101FCID no:1. Fixing lo
University of Auckland - COMPSCI - 101
415.101FCTHE UNIVERSITY OF AUCKLAND_EXAMINATION FOR BSc ETC 2000_COMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO hours)NOTE:Attempt ALL questions.Write your answers in the answer book provided at the end of the exam paper. Youmay de
University of Auckland - COMPSCI - 101
415.101FC PRINCIPLES OFPROGRAMMINGANSWER BOOKTest - Tuesday 11th April 6:30pm-8:00pm1. Draw the output.2. Corrected program (with changes CIRCLED):1) Word static missing from main() declaration2) variable toss is not declared3) the = sign should b
University of Auckland - COMPSCI - 101
4 15.101FC PRINCIPLESOF PROGRAMMINGTest Tuesday 11th April 20006 :30pm - 8:00pmINSTRUCTIONSThis test constitutes 15% of your final grade for the course.You have 5 minutes reading time.Do not write until you are told.No one is to leave in the last
University of Auckland - COMPSCI - 101
415.101 STTHE UNIVERSITY OF AUCKLANDEXAMINATION FOR BA BSc ETC 2000COMPUTER SCIENCEPrinciples of Programming(Time Allowed: TWO hours)SurnameForenamesStudent IDLogin (UPI)NOTE:Attempt ALL questions.Write your answers in the space provided.Ther
University of Auckland - COMPSCI - 101
415.101 STTHE UNIVERSITY OF AUCKLANDEXAMINATION FOR BA BSc ETC 2000COMPUTER SCIENCEPrinciples of Programming(Time Allowed: TWO hours)SurnameForenamesStudent IDLogin (UPI)NOTE:Attempt ALL questions.Write your answers in the space provided.Ther
University of Auckland - COMPSCI - 101
415.101SC/ST 2000Principles of ProgrammingTest SOLUTIONS:Monday 21st August 6.30pm 7.45pmQuestion 1 (10 marks)Question 2 (5 marks)1 () after String2 = after rand3 ; after if4 glass5 missing cfw_ after mainQuestion 3 (10 marks)public void paint
University of Auckland - COMPSCI - 101
415.101SC/ST 2000Principles of ProgrammingTest:Monday 21st August 6.30pm 7.45pmSurname (Family Name):First Name(s):Login Name:ID Number:Lab Time:Note: Attempt ALL questions. Calculators are NOT permitted.Write your answers in the spaces provided
University of Auckland - COMPSCI - 101
T HE UNIVERSITY OF AUCKLANDSUMMER SEMESTER, 2001COMPUTER SCIENCEPrinciples of ProgrammingEXAM ANSWERSQuestion 1 (6 marks):i)String[] allStrings = new String[300];ii)allStrings[9] = "Relax";iii)len = allStrings[9].length();Question 2 (15 marks)
University of Auckland - COMPSCI - 101
Question / Answer Sheet-2-CompSci 101 ACSurname: . Forenames: .Question 1 (6 marks)i) Declare and create an array of String elements called allStrings which is large enough tocontain 300 String elements:ii) Assign the String, " Relax" to the 10th e
University of Auckland - COMPSCI - 101
C ompSci 101 AC - 2001Terms Test AnswersQuestion 1:Output from class Q1:615.04.05.0Question 2:The completed actionPerformed() method for the class Q2:public void actionPerformed(ActionEvent e) cfw_String s1 = tOne.getText();String s2 = tTwo.g
University of Auckland - COMPSCI - 101
Question/Answer Sheet- Page 1 -SURNAME: .CompSci 101 ACFORENAMES: .Question 1 (5 marks)What is the output of the following Java application?public class Q1 cfw_public static void main(String[] args) cfw_int i;double d;i = 6 % 10;System.out.pri
University of Auckland - COMPSCI - 101
C ompSci 101 FCTHE UNIVERSITY OF AUCKLANDFIRST SEMESTER, 2001City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO h ours)Surname:PerfectForenames:Mr.Student ID number:2001INSTRUCTIONS:Attempt ALL questions - write your answ
University of Auckland - COMPSCI - 101
C ompSci 101 FCTHE UNIVERSITY OF AUCKLANDFIRST SEMESTER, 2001City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO h ours)Surname:Forenames:Student ID number:INSTRUCTIONS:Attempt ALL questions - write your answers in the space
University of Auckland - COMPSCI - 101
C ompSci 101 FC 2001Terms Test AnswersQuestion 1 (10 marks)Part A (5 marks)The contents of a simple HTML file is given below. The page contains an applet called Test, which hasbeen compiled, and the class file for this applet is in the same directory
University of Auckland - COMPSCI - 101
COMPSCI 101 SC/STTHE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2001Campus: City/TamakiCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO hours)NOTE:Attempt ALL questions.Write your answers in the space provided.There is space at the back f
University of Auckland - COMPSCI - 101
COMPSCI 101 SC/STTHE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2001Campus: City/TamakiCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO hours)NOTE:Attempt ALL questions.Write your answers in the space provided.There is space at the back f
University of Auckland - COMPSCI - 101
COMPSCI 101 TESTTHE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2001Campus: City/TamakiCOMPUTER SCIENCETEST SOLUTIONSPrinciples of Programming(Time allowed: ONE hour and 15 minutes)NOTE:Attempt ALL questions.Write your answers in the space provided.
University of Auckland - COMPSCI - 101
COMPSCI 101 TESTTHE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2001Campus: City/TamakiCOMPUTER SCIENCETESTPrinciples of Programming(Time allowed: ONE hour and 15 minutes)NOTE:Attempt ALL questions.Write your answers in the space provided.There is s
University of Auckland - COMPSCI - 101
Question/Answer SheetSURNAME: .- Page 25 -CompSci 101 ACFORENAMES: .CompSci 101 AC 2002 Final Exam Model AnswersQUESTION 1a)b)c)d)e)-115.105d is: 12.0i is : 1232QUESTION 2private static String randomString(String[] words) cfw_int randIn
University of Auckland - COMPSCI - 101
C ompSci 101 ACTHE UNIVERSITY OF AUCKLANDSummer School, 2002City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO h ours)Surname:Forenames:Student ID number:INSTRUCTIONS:Attempt ALL questions - write your answers in the space p
University of Auckland - COMPSCI - 101
C ompSci 101 AC 2002 Terms TestMODEL ANSWERSQUESTION 1a)b)c)d)e)f)g)h)i)2ter3.34THE CODE WILL COMPILE123456System.out.println("\n\n\n");i is: 80d is: 4.5-1655QUESTION 24 syntax errors:1) String allStars = ' *' ;single quotes, sh
University of Auckland - COMPSCI - 101
C ompSci 101 ACTHE UNIVERSITY OF AUCKLANDSUMMER SCHOOL, 2002COMPUTER SCIENCEPrinciples of ProgrammingTERMS TEST(Time allowed: 75 MINUTES)Surname:Forenames:Student ID number:Circle ONE of the following:Lab time:T hursday 11-1Friday 11-1Thursd
University of Auckland - COMPSCI - 101
- 13 -COMPSCI 101FCAnswer bookSURNAME:FORENAMES:DEGREE (BSc, COP, Etc):STUDENT IDENTIFICATION NUMBER:SIGNATURE:Examiner to complete:QuestionMarkQuestion1627384Mark95TOTALCONTINUEDANSWER BOOK- 14 -Surname:Forenames:COMPSCI 101FC
University of Auckland - COMPSCI - 101
COMPSCI 101FCTHE UNIVERSITY OF AUCKLAND_EXAMINATION FOR BSc ETC 2002_COMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO hours)NOTE:Attempt ALL questions.Write your answers in the answer book provided at the end of the exam paper. Youma
University of Auckland - COMPSCI - 101
COMPSCI 101FC 2002 TEST AND ANSWER BOOKPAGE 1STUDENT UPI:Question 1 (11 marks)a) What would be printed out by the following code segment?int i = 10;double d = i / 3;System.out.println(d);3.0(1 mark)b) What is printed by the following?System.out
University of Auckland - COMPSCI - 101
C OMPSCI 101FC Principles ofP rogrammingTest and Answer BookT est - Thursday 18th April 6:30pm-8:00pmFamily name or surnameGiven namesLab Day and Time (e.g. Monday 9)I nstructionsThis test constitutes 15% of your final grade for the course.No one
University of Auckland - COMPSCI - 101
COMPSCI 101THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2002Campus: City and TamakiCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO hours)NOTE: Attempt ALL questions.Write your answers in the space provided.There is space at the back for
University of Auckland - COMPSCI - 101
COMPSCI 101THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2002Campus: City and TamakiCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO hours)NOTE: Attempt ALL questions.Write your answers in the space provided.There is space at the back for
University of Auckland - COMPSCI - 101
COMPSCI 101THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2002Campus: City and TamakiCOMPUTER SCIENCETESTPrinciples of Programming(Time allowed: 75 minutes)NOTE:Attempt ALL questions.Write your answers in the space provided.There is space at the ba
University of Auckland - COMPSCI - 101
COMPSCI 101THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2002Campus: City and TamakiCOMPUTER SCIENCETESTPrinciples of Programming(Time allowed: 75 minutes)NOTE: Attempt ALL questions.Write your answers in the space provided.There is space at the ba
University of Auckland - COMPSCI - 101
CompSci 101 SS CTHE UNIVERSITY OF AUCKLANDSummer School, 2003City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - write your answ
University of Auckland - COMPSCI - 101
CompSci 101 SS CTHE UNIVERSITY OF AUCKLANDSummer School, 2003City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - write your answ
University of Auckland - COMPSCI - 101
CompSci 101 SS C Terms Test 2003Answers to question 1, 2, 10 and 11QUESTION 1a)b)c)d)e)f)g)h)5.0Total = 51.5Total = " + 5 + 1.5n\\n10097int rand = (int)(Math.random() * 50) * 2) + 1;System.out.println(rand);QUESTION 24 syntax errors:
University of Auckland - COMPSCI - 101
C ompSci 1 01 S S CTHE UNIVERSITY OF AUCKLANDSUMMER SCHOOL, 2003COMPUTER SCIENCEPrinciples of ProgrammingTERMS TEST(Time allowed: 75 MINUTES)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - write your a
University of Auckland - COMPSCI - 101
CompSci 101 S1 CTHE UNIVERSITY OF AUCKLANDFirst Semester, 2003City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - write your ans
University of Auckland - COMPSCI - 101
CompSci 101 S1 CTHE UNIVERSITY OF AUCKLANDFirst Semester, 2003City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - write your ans
University of Auckland - COMPSCI - 101
CompSci 101 S1 CTHE UNIVERSITY OF AUCKLANDFIRST SEMESTER, 2003COMPUTER SCIENCEPrinciples of ProgrammingTERMS TEST(Time allowed: 60 MINUTES)Surname:SOLUTIONSForenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - writ
University of Auckland - COMPSCI - 101
CompSci 101 S1 CTHE UNIVERSITY OF AUCKLANDFIRST SEMESTER, 2003COMPUTER SCIENCEPrinciples of ProgrammingTERMS TEST(Time allowed: 60 MINUTES)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - write your ans
University of Auckland - COMPSCI - 101
COMPSCI 101 S2 C/TTHE UNIVERSITY OF AUCKLANDSecond Semester, 2003City/Tamaki CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - writ
University of Auckland - COMPSCI - 101
COMPSCI 101 S2 C/TTHE UNIVERSITY OF AUCKLANDSecond Semester, 2003City/Tamaki CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions - writ
University of Auckland - COMPSCI - 101
COMPSCI 101 S2THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2003COMPUTER SCIENCEPrinciples of ProgrammingTEST(Time allowed: 75 MINUTES)Surname:Forenames:Student ID number:Login name (UPI):Lab Group (e.g. Mon 1-3):INSTRUCTIONS:Attempt ALL questio
University of Auckland - COMPSCI - 101
COMPSCI 101 S2THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2003COMPUTER SCIENCEPrinciples of ProgrammingTEST(Time allowed: 75 MINUTES)Surname:Forenames:Student ID number:Login name (UPI):Lab Group (e.g. Mon 1-3):INSTRUCTIONS:Attempt ALL questio
University of Auckland - COMPSCI - 101
CompSci 101 SS CTHE UNIVERSITY OF AUCKLANDSummer Semester, 2004City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questionsWrite your answ
University of Auckland - COMPSCI - 101
CompSci 101 SS CTHE UNIVERSITY OF AUCKLANDSummer Semester, 2004City CampusCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questionsWrite your answ
University of Auckland - COMPSCI - 101
CompSci 101THE UNIVERSITY OF AUCKLANDFirst Semester, 2004Campus: City and TamakiCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:MODELForenames:ANSWERSStudent ID number:123456789Login name (UPI):abcd001INSTRUCTIONS:
University of Auckland - COMPSCI - 101
CompSci 101THE UNIVERSITY OF AUCKLANDFirst Semester, 2004Campus: City and TamakiCOMPUTER SCIENCEPrinciples of Programming(Time allowed: TWO HOURS)Surname:Forenames:Student ID number:Login name (UPI):INSTRUCTIONS:Attempt ALL questions, calculat
University of Auckland - COMPSCI - 101
e) What is printed by the following?CompSci 101 S1 2004 City and TamakiSystem.out.println(5 + 9 % 2 * (10 / 4) - 6);Terms Test Model Answers1Question 1 (20 marks)(2 marks)a) What is printed by the following?f) What is printed by the following?Sys
University of Auckland - COMPSCI - 101
CompSci 101THE UNIVERSITY OF AUCKLANDSEMESTER ONE, 2004Campus: City and TamakiCOMPUTER SCIENCETESTPrinciples of Programming(Time allowed: 75 MINUTES)NOTE: Attempt ALL questions Write your answers in the space provided There is space at the back
University of Auckland - COMPSCI - 101
CompSci 101 Semester 2, 2004Test Answers123456789101112131415161718192021222324252627282930ADDCDEDACDDEDEAADABAEDDAABDECACOMPSCI 101 - Laboratory 0631num1:num1:num1:num1:0,1,2,8,num2:
University of Auckland - COMPSCI - 101
COMPSCI 101 S2THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2004COMPUTER SCIENCEPrinciples of ProgrammingTEST Question Sheet(Time allowed: 75 MINUTES)INSTRUCTIONS:Attempt ALL questionsWrite all answers in the Answer Sheet providedCalculators are NO
University of Auckland - COMPSCI - 101
VERSION 1COMPSCI 101THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2004Campus: CityCOMPUTER SCIENCEPrinciples of Programming(Time Allowed: TWO hours)Surname .Forenames .Student ID .Login name(UPI) .NOTE:Attempt ALL questionsAnswer the multiple c
University of Auckland - COMPSCI - 101
VERSION 1COMPSCI 101THE UNIVERSITY OF AUCKLANDSECOND SEMESTER, 2004Campus: CityCOMPUTER SCIENCEPrinciples of Programming(Time Allowed: TWO hours)Surname .Forenames .Student ID .Login name(UPI) .NOTE:Attempt ALL questionsAnswer the multiple c
University of Auckland - COMPSCI - 101
SUMMER SEMESTER, 2004Campus: CityCOMPUTER SCIENCETEST ANSWERSPrinciples of ProgrammingANSWERSQUESTION 1a)b)c)d)e)f)g)h)i)j)k)l)m)n)19a5 + 1.52ask ball2.02.0true[1,10]8\n"-15511.010.15QUESTION 2a)The cast is performed b