63 Pages

chap10

Course: SOFTWARE I c0327, Spring 2009
School: Nanjing University
Rating:
 
 
 
 
 

Word Count: 2702

Document Preview

Stallings William Computer Organization and Architecture Chapter 10 Instruction Sets: Characteristics and Functions What is an instruction set? Thecompletecollectionofinstructionsthatare understoodbyaCPU MachineCode,i.e.binary Usuallyrepresentedbyassemblycodes H * n ? W ,16 101 102 103 104 201 202 203 204 Machine Code (4 OP 0010 0001 0001 0011 0000 0000 0000 0000 ,12 ) Assembly code Operand 0010...

Register Now

Unformatted Document Excerpt

Coursehero >> China >> Nanjing University >> SOFTWARE I c0327

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.
Stallings William Computer Organization and Architecture Chapter 10 Instruction Sets: Characteristics and Functions What is an instruction set? Thecompletecollectionofinstructionsthatare understoodbyaCPU MachineCode,i.e.binary Usuallyrepresentedbyassemblycodes H * n ? W ,16 101 102 103 104 201 202 203 204 Machine Code (4 OP 0010 0001 0001 0011 0000 0000 0000 0000 ,12 ) Assembly code Operand 0010 0000 0001 0010 0000 0010 0010 0000 0011 0010 0000 0100 0000 0000 0000 0000 0000 0000 0000 0000 0010 0011 0100 0000 two three four sum LDA ADD ADD STA DAT DAT DAT DAT two three four sum 2 3 4 0 Elements of an Instruction Operationcode(Opcode) SourceOperandreference ResultOperandreference NextInstructionReference Puttheanswerhere Tothis Dothis Move$R1,#2 MPY$R1,pi JumpL LHalt pi.DAT3.14 Whenyouhavedonethat,dothis... Where have all the Operands gone? I/Odevice( * Mainmemory( virtualmemoryorcache, CPUregister( * , * . * ) ) ) Components CPU memory registers data ALU data cache program data Control unit Bus data data I/O I/O Instruction Representation Inmachinecodeeachinstruction( e ) hasauniquebitpattern Forhumanconsumption(well,programmers anyway)asymbolicrepresentationisused Operandscanalsoberepresentedinthisway ADDA,B e.g.ADD,SUB,LOAD Simple Instruction Format Instruction Types ( O * : , Dataprocessing , , ?) ,I/O Datastorage(mainmemory O * I/O LOAD,STOR,MOVE,... INPUT,OUTPUT,... ADD,SUB,MPY,DIV;AND,OR,NOT;SHL, SHR,... ) Programflowcontrol JUMP;CMP,JLE,..;CALL,RETURN;... Number of Addresses (a) e T , e 3addresses ; e Operand1,Operand2,Result a=b+c; Notcommon Needsverylongwordstoholdeverything ADDb,c,a add$R3,$R1,$R2 ;ba+c ;$R3$R1+$R2 Number of Addresses (b) 2addresses Oneaddressdoublesasoperandandresult a=a+b Reduceslengthofinstruction Requiressomeextrawork Temporarystoragetoholdsomeresults ADDa,b aa+b $R,*N d Number of Addresses (c) 1address Implicitsecondaddress Usuallyaregister(accumulator) Commononearlymachines ADDa 2 *C X ACAC+a Number of Addresses (d) 0(zero)addresses e.g.pusha a n a (n Usesastack pushb ) b a + P375 a+b c add popc c=a+b P335 How Many Addresses Moreaddresses Morecomplex(powerful?)instructions Moreregisters Fewerinstructionsperprogram Interregisteroperationsarequicker Feweraddresses Lesscomplex(powerful?)instructions Moreinstructionsperprogram Fasterfetch/executionofinstructions Design Decisions (1) Operationrepertoire RISCvCISC 100 Howmanyops? Whatcantheydo? Howcomplexarethey? 2 10 Callsubroutine ~200 ? Datatypes( ?) Instructionformats Lengthofopcodefield Numberofaddresses Design Decisions (2) Registers NumberofCPUregistersavailable Whichoperationscanbeperformedonwhich registers? direct,immediate,base,indirect, 0 Addressingmodes(later) 31 2000 add $R2, 2F00 56 2F00 8 5 19 base address $R1 ? 300000 add $R2,300F00 300F00 78 300000 32 o registers add $R2,$R1(F00) Logicaladdress 0000 0001 0002 0003 0004 LDA $R1(10) MPY $R1(11) MPY $R1(12) STA $R1(13) GO $R1(0) 0010 0011 0012 0013 ... segment logical address = $R1+offset = $R1(offset) ... ... 2 3.14 6.5 Types of Operand Addresses Numbers P: 1000 Characters Integer/floatingpoint ASCIIetc. LogicalData Bitsorflags (Aside:Isthereanydifferencebetweennumbersand characters?AskaCprogrammer!) `T XW P DNS o Type A MX A A Memory Name IP address www.nju.edu.cn 202.119.32.6 netra.nju.edu.cn 202.119.32.8 cs.nju.edu.cn 202.119.36.38 software.nju.edu.cn219.19.38.2 w w w u u \0 . . 6 . . . 2 1 3 \0 01100011 n e c 0 1 2 A j d n 2 9 . \0 S oX ` i 2 o bytes 1 Pentium Data Types ( ) 0 8bitByte 4 16bitword o 32bitdoubleword 64bitquadword Addressingisby8bitunit A32bitdoublewordisreadataddresses divisibleby4 Specific Data Types Generalarbitrarybinarycontents Integersinglebinaryvalue(1,2,4,8bytes) Ordinalunsignedinteger(1,2,4,8bytes) FloatingPoint UnpackedBCDOnedigitperbyte PackedBCD2BCDdigitsperbyte Bitfield BinaryCodeDecimal ByteString BCD (Binary-Code Decimal) p UnpackedBCD 1h ( * 1h ( PackedBCD 1h ( *2h ( ,2008 ,2008 P338 . 00000010 0000000 0 00000000 00001000 . BCD : 4 ,usuallyinmultiplesof8 bits. ,246 00100000 0000100 0 G W 10.13 W ,1698+1786=3484 0001011010011000 + 0001011110000110 : 0010111000011110>9 n >9, 6 + 0110 n * , 6 0010111000100100 + 0110 10 1, 0010111010000100 16 1, 6. + 0110 0011010010000100 Pentium Data Types P340 PowerPC Data Types 8(byte),16(halfword),32(word)and64(doubleword) lengthdatatypes Someinstructionsneedoperandalignedon32bit boundary Canbebigorlittleendian Fixedpointprocessorrecognises: Floatingpoint Unsignedbyte,unsignedhalfword,signedhalfword,unsigned word,signedword,unsigneddoubleword,bytestring(<128 bytes) IEEE754 Singleordoubleprecision Types of Operation DataTransfer Arithmetic Logical TransferofControl I/O Conversion SystemControl ppt Transfer 9 P341 Data Specify Source Destination Amountofdata P344 Load$R2,Pi;$R2Pi Store$R2,x;x$R2 Maybedifferentinstructionsfordifferent movements e.g.IBM370 L $R1,two ;32 ;16 LH$R1,two ;16AX 2 ;8 PC MOVAX,053H AL 16 W Accumulator MOVAH, AH Arithmetic Add,Subtract,Multiply,Divide Mayinclude SignedInteger Floatingpoint Increment(a++) Decrement(a) Negate(a) inc a dec a Shift and Rotate Operations 0 P346 On a left arithmetic shift, a logical left shift is performed on all bits but the sign bit, which is retained. W W 1000,1100,0101,0111 1100,0110,0010,1011 1000,1100,0101,0111 1001,1000,1010,1110 0011,1100,0101,0111 0001,1110,0010,1011 0111,1100,0101,0111 0111,1000,1010,1110 Logical Bitwiseoperations AND,OR,NOT,XOR R1=202.119.36.101 R2= 255.255.255.0 202.119.36.0 IP o 10100101 XOR 11111111 01011010 Transfer of Control (if, for, W Branch BRLbranchtoL BRZLbranchtoLifresultiszero ) P344 Example:ifA=BthenprintAandBelseprintB load$R1,A sub$R1,B BRZL PRNA L:PRNB ;$R1A ;$R1BA ;ifAB=0, L ; A Branch Instruction Pentium EFLAGS W Sign flag Zero flag OD I TS Z A P C P443,Fig12.20 16 o Overflow flag 16 o Interrupt enable flag Auxiliary carry flag Carry flag n ` P359 E,Z Z=1 NE,NZ Z=0 G,NLE[z=0]and[.] ; 0 ; 0 >;notlessthanorequal() 80x86 W W :IFa>bthen : ; P369, 10.15 c. subCX,CX movAX,b cmpAX,a JGE L1 incCX L1opxx,yyy CX0 ; AXb ;b~a ;ifb>=a L1 ;CXCX+1, a>b,CX=1 ;a<=b,CX=0 Transfer of Control Skip Example,S=(1+2+3++10) ISZ$R1increment$R1andskipif$R1iszero P350 Subroutinecall call return load $R1, ten ; $R1-10 clear $R2 ; $R20 L1: add $R2, $R1 ISZ $R1 ; $R1+1 BR L1 L2: store $R2, S stop ten DAT -10 Call a function P1(a) L: Compiler generates Program voidP1(u); {... } Compiler generates pusha callP1 L: {popu ... return } Use of Stack Conversion BinarytoDecimal EBCDICtoASCII P342, P199 ExtendedBinaryCodedDecimalInterchangeCode AmericanStandardCodeforInformationInterchange Conversion EBCDICtoASCII(IRA) ASCII 00 30 31 39 7F NUL 0 1 9 Character F2F0F0F632303036 EBCDIC F0 F1 F9 DEL Conversion EBCDICtoASCII R1 1000 1000 R2 2100 2100 2103 F2 F0 F0 F6 32 30 30 36 TR R1, R2, 4 10F0 10F1 10F9 10FF 30 31 39 Input/Output P207 Maybespecificinstructions(isolatedI/O) Maybedoneusingdatamovementinstructions (memorymapped) Maybedonebyaseparatecontroller(DMA): Ch7-21 Systems Control Privilegedinstructions CPUneedstobeinspecificstate Foroperatingsystemsuse read a control register (P445) access PCB (P253) Ring0on80386+ Kernelmode Foreground Reading PentiumandPowerPCoperationtypes Stallingsp338et.Seq. Byte Order (A portion of chips?) Whatorderdowereadnumbersthatoccupy morethanonebyte e.g.(numbersinhextomakeiteasytoread) 12345678canbestoredin4x8bitlocationsas follows 184 12 34 big 56 187 78 184 78 56 34 187 12 little Byte Order (example) Address 184 185 186 187 Value(1) 12 34 56 78 Value(2) 78 56 34 12 P377 i.e.readtopdownorbottomup? Byte Order Names TheproblemiscalledEndian Themappingontheleftstoresthemost significantbyteinthelowestaddress Thisiscalledbigendian Themappingontherightstorestheleast significantbyteinthelowestaddress Thisiscalledlittleendian P377 Example of C Data Structure Alternative View of Memory Map P379 StandardWhat Standard? Pentium(80x86),VAXarelittleendian IBM370,Motorola680x0(Mac),andmostRISC arebigendian Internetisbigendian MakeswritingInternetprogramsonPCmore awkward! WinSockprovideshtoianditoh(HosttoInternet& InternettoHost)functionstoconvert Summary 1.Elementsofaninstruction OPOperand1,Operand2, 1,2,3,0addressesinstruction 2.Typesofoperand number: character: address: logicaldata: char integer,ordinal,floatpointB pointer bitfield,bytestring 3.TypesofOperation DataTransfer Arithmetic Logical TransferofControl I/O Conversion SystemControl 4.Processingunits 8bitByte 16bit 32bit 64bit ... 5.Usingassemblylanguagetowritea program Assignment 1. 10.3 2. 10.14 3. 10.15(d) P360 80x86 1.8086 AX BX CX DX BP SP SI DI P431 Registers:8generalpurpose,4segment,2 control, 16bits AH BH CH DH AL BL CL DL Accumulator Base(BaseRegister) Count Data BasePoint(16 ), S <S StackPoint SourceIndex DestinationIndex , DS In 80x86 MOV SI, 1 MOV CX, 10 L1: MOV AX, A[SI] ADD AX, B[SI] MOV C[SI], AX INC SI LOOP L1 STOP Array A DB Array B DB Array C DB S * < X ; SI1 ; CX10 ; AXA[i] ; AXA[i]+B[i] ;C[i]A[i]+B[i] ; SISI+1 ; CXCX1,if(CX=0) ;o ,o L1 , P loop. P Segmentregisters: CS DS SS ES CodeSegment DataSegment StackSegment ExtraSegment Controlregisters: IP Flag OD I TS Z A P C InstructionPointer(PC) Flag (P358,443) CS 0 DS 0 o SS SP 0 o H :[BX]=(DS)*10H+(BX) [BP]=(SS)*10H+(BP) 32 2.80x86 8 6 EAXEBXECXEDX EBPESPESIEDI DSCSSSESFSGS EIP EFLAGS 16 <n 32 <n * 16 32 32 <n * 32 n <* 32 AH BH CH DH AL BL CL DL EAX EBX ECX EDX EBP ESP ESI EDI EIP OD I TS Z A P C EFLAGS
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:

Nanjing University - SOFTWARE I - c0327
William Stallings Computer Organization and ArchitectureChapter 11 Instruction Sets: Addressing Modes and FormatsReview Instruction:OPoperandoperandOP P 1 2 2 ? Assume,sizeofmemory=232 Goal: Youcanreferencealargerangeoflocationsin memoryorvirtualmemo
Nanjing University - SOFTWARE I - c0327
William Stallings Computer Organization and ArchitectureChapter 12 CPU Structure and FunctionStructure - The CPU CPU L y L y , L hComputerI/O System Bus Memory CPUChapter 9 CPURegisters Arithmetic and Login UnitInternal CPU InterconnectionControl
Nanjing University - SOFTWARE I - c0327
William Stallings Computer Organization and ArchitectureChapter 13 Reduced Instruction Set Computers (RISC)X kq kq 9 in i 9(9 i,) 8Major Advances in Computers(1)W SolidStateRAM( * ) Cachememory Pipelining: ( 2 ) ( 1 ) n : n RISC : * , : Microproc
Nanjing University - SOFTWARE I - c0327
William Stallings Computer Organization and ArchitectureChapter 16 Control Unit OperationStructure - The CPUW W t f t .x 8 ,CPUComputerI/O System Bus Memory CPUP11, P408RegistersArithmetic and Login UnitInternal CPU InterconnectionControl Unit
Nanjing University - SOFTWARE I - c0327
Nanjing University - SOFTWARE I - c0327
Nanjing University - SE - C0229
CountingCounting Countable Set Permutations and combinations Pigeonhole Principle Recurrence RelationsCountable Set A set A is countable if and only if we can arrange all of its elements in a linear list in a definite order. Definite means that we ca
Nanjing University - SE - C0229
EquivalenceLecture 6 Discrete Mathematical StructuresEquivalenceProperties of Relation Reflexivity Symmetry Transitivity Equivalence Equivalence and PartitionReflexivityRelation R on A is Reflexive if for all aA, (a,a)R Irreflexive if for all a
Nanjing University - SE - C0229
GraphsLecture 9 Discrete Mathematical StructuresA C B DProblem of Crossing RiverProblem: A person(P), a wolf(W), a lamb(L) and a cabbage(C) will cross a river by a boat which can carry any two of them once. Wolf and lamb, or, lamb and cabbage, cannot
Nanjing University - SE - C0229
GroupLecture 14 Discrete Mathematic StructuresGroup Group axioms Association Identity Inverse property Example Addition group on integers (Z,+) All one-to-one functions on cfw_1,2,3, plus composition of function: S3Inverse Property of a System For
Nanjing University - SE - C0229
LogicThe discipline that deals with the methods of reasoning04/01/10 1The example of reason If I am your teacher then I should give you lessons I am your teacher So I should give you lessons Is it right? Maybe just now!04/01/10 2Another example of r
Nanjing University - SE - C0229
Poset and LatticeLecture 7 Discrete Mathematical Structures P P P Partial Order Reflexive, antisymmetric and transitive Generalization of less than or equal to Denotation: Example 1: set containment Note: not any two of sets are comparable Exampl
Nanjing University - SE - C0229
Relations and DigraphsLecture 5 Discrete Mathematical StructuresRelations and Digraphs Cartesian Product Relations Matrix of Relation Digraph Paths in DigraphOrdered Pair and Cartesian Product Ordered pairs: (a,b) (a,b) = (c,d) iff a = c and b = d
Nanjing University - SE - C0229
Algebraic Systems and GroupsLecture 13 Discrete Mathematical StructuresAlgebraic Operations Function :AnB is called an n-nary operation from A to B. Binary operation: :A AB (:A AA) An example: a new operation * defined on the set of real number, using
Nanjing University - SE - C0229
Welcome to:Discrete Mathematical Structures04/01/10 1 About myself:4 Qa http:/moon.nju.edu.cn/~txp txp@nju.edu.cn 025-8359369404/01/102 About You?04/01/103Discrete Mathematic Course description f 9 f 9 f 9 f 9 =Icfw_ - c 9 / Fs =.R[ 904/01
Nanjing University - SE - C0229
Transportation NetworkLecture 10 Discrete Mathematical StructuresTransport NetworksThe unique node with out-degree 0 The sink 4 1 5 4 2 2 3 2 3 3 3 Capacity of edge, Ci,j 5 4 6The unique node with in-degree 0 The source It is assume that all edges are
Nanjing University - SE - C0229
TreesLecture 8 Discrete Mathematical StructuresRooted TreeLet A be a set, and let T be a relation on A. T is a rooted tree if there is a vertex v0 in A with the property that there exists a unique path in T from v0 to every other vertex in A, but no pa
Columbus State University - CPSC - 1105
CPSC 1105 Technological Solutions Spring 2004 CRN 21012Dr. Wayne Summers Instructorsummers_wayne@colstate.eduDepartment of Computer Science Office Hours: By appointment only Kimberly Pak Teaching AssistantContact through Webct email ONLY *To email thr
Columbus State University - CPSC - 1105
Department of Computer Science College of Science, Columbus State UniversityInstructor(s): Dr. Wayne Summers Office: CCT 455 Office phone: (706) 568-5037 Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office Hours: MWF 9:50-11:50 a.m., T
Columbus State University - CPSC - 1105
Department of Computer Science College of Science, Columbus State UniversityInstructor(s): Dr. Wayne Summers Office: CCT 455 Office phone: (706) 568-5037 Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office Hours: MWF 9:30-11:30 a.m., T
Columbus State University - CPSC - 1105
CPSC 1105 Technological Solutions Fall 2006 CRN CCT 122Instructor(s): Office: CCT453 Office phone: (706) 568Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office Hours:; via e-mail, net-meetings and by appointment e-mail address: @colsta
Columbus State University - CPSC - 1105
Grading RubricPresentation Graded Assignment (Resume/Cover Letter) (50 pts)This assignment is to use a presentation program to develop a presentation for your dream jobPresentation Assignment (50 pts) Content (15 pts) a) Title page haspersonal data.5
Columbus State University - CPSC - 1105
Grading RubricWord Assignment (50 pts) Content (20) Resume Enhancements(5) Cover Letter Enhancements(5) Organization(5) Comprehensibility(5) Effort(5) Grammar, Mechanics, Spelling, and Sentence Structure(5) Content (20) Resume Enhancements(4) Cover Lette
Columbus State University - CPSC - 1105
Grading RubricWord Graded Assignment (Resume/Cover Letter) (50 pts)This assignment is to use a wordprocessor to create a resume and a cover letter for your dream jobWord Assignment (50 pts) Content (20 pts) a) Resume haspersonal data.5 (Excellent)4
Columbus State University - CPSC - 1105
Grading RubricVideo Graded Assignment (50 pts)This assignment is to use a video presentation program to develop a video with your contentPresentation Assignment (50 pts) Content (18 pts)5 -6(Excellent)4 (Good)2-3 (Fair)0-1 (Poor)a) at least 5 imag
Columbus State University - CPSC - 1105
Presentation Assignment (50 pts) Content (15 pts) a) Title page has personal data (5) b) Slides for:education, work experience, job skills, hobbies, references(10)Enhancements (5) Special Features (clip art, animation, transitions) (10) Organization (5)
Columbus State University - CPSC - 1105
CPSC1105 Fall2009 81173,81178,81181,81185Course Syllabus CPSC 1105 Introduction to Information TechnologyThissyllabusissubjecttochangepriortothestartofthecourse. Instructor WayneSummers Email:summers_wayne@colstate.edu Office:CCT453 OfficeHours:MW1012,5
Columbus State University - CPSC - 1105
CPSC1105 Fall2009 81173,81178,81181,81185Course Syllabus CPSC 1105 Introduction to Information TechnologyThissyllabusissubjecttochangepriortothestartofthecourse. Instructor WayneSummers Email:summers_wayne@colstate.edu Office:CCT453 OfficeHours:MW1012,5
Columbus State University - CPSC - 1105
CPSC 1105 Technological Solutions Fall 2003Dr. Wayne Summers Instructorsummers_wayne@colstate.eduDepartment of Computer Science Office Hours: By appointment only Kimberly Pak Teaching AssistantContact through Webct email ONLY *To email through Webct s
Columbus State University - CPSC - 1301
Little or Nothing deal Overall how much did you get of class so far? 1 2A fair amount 3 4A great 5What was the most important thing you learned? What was the muddiest point? What single change by the instructor (Dr. Summers) would most improve this cla
Columbus State University - CPSC - 1301
Department of Computer Science College of Science, Columbus State UniversityCourse Title: CPSC1301 Computer Science I Official Course Description: This course includes an overview of computers and programming; problem solving and algorithm development; s
Columbus State University - CPSC - 1301
NAME_ DATE_ ASSIGNMENT # _ GRADE_NAME_ DATE_ ASSIGNMENT # _ GRADE_EVALUATION SHEETRuns correctly.:_/10 Correct output.:_/10 Design of output.:_/8 Design of logic:_/10 Standards.:_/7 Documentation.:_/5 Extra Credit12345 TOTAL.:_/50 NAME_ DATE_ ASSIGNMEN
Columbus State University - CPSC - 1301
CPSC 1301 Computer Science 1 ARRAYS Study SheetUse the following declarations to answer the following questions:LOOPS andconst int arraySize = 10; int [] list = new int[arraySize]; double[] sales= cfw_12.25, 32.50, 23.65, 26, -45.67; String [] names =
Columbus State University - CPSC - 1301
One Minute PaperWhat was the most important (significant, crucial) thing you learned in todays class?What question(s) do you have about the material covered in todays class?What was the muddiest point in todays lecture?=One Minute PaperWhat was the
Columbus State University - CPSC - 1301
One Minute PaperWhat was the most important (significant, crucial) thing you learned in todays class?What question(s) do you have about the material covered in todays class?What specific changes should I make that would help you learn more effectively
Columbus State University - CPSC - 1301
One Minute PaperWhat was the most important (significant, crucial) thing you learned in todays class?What question(s) do you have about the material covered in todays class?What was the muddiest point in todays lecture?=One Minute PaperWhat was the
Columbus State University - CPSC - 1301
LAB 7 - Functions IIThe purpose of this lab is to reinforce the use of functions in the C+ programming language. In this lab you will develop five functions that, given three integers, say, A,B, and C,1. 2. 3. 4.find the smallest value among them, find
Columbus State University - CPSC - 1301
Number and Title of Course: CPSC1301 Computer Science IClass Meets: T 9:30-10:45 a.m. in Clearview Hall II-111 Thursday in Woodall 159Instructor(s): Dr. Wayne Summers Office: FOB114 Office phone: (706) 568-3057 Department phone: (706) 568-2410 Departmen
Columbus State University - CPSC - 1301
Arrays and StringsArrays dataType arrayName[intExp]; int nbr[5]; Accessing Array Components arrayName[indexExp] int list[10]; list[5] = 34; i = 3; list[i] = -15; const int arraySize = 10; int list[arraySize]; Processing One-Dimensional Arrays for (i = 0;
Columbus State University - CPSC - 1301
Arrays IIC-Strings (Character Arrays Terminated with null character (\0) char studentName[26]; studentName = Wayne Summers; /illegal include &lt;cstring&gt; strcpy(s1, s2); strcmp(s1, s2); strlen(s) String Input cin &gt; name; cin.get(str, size+1); String Output
Columbus State University - CPSC - 1301
Assignment 3 - Tuition and Fees Invoice (part 2)(Due before class on September 26, 2002) The following assignment is intended to enhance your understanding of the basics of C+ programming and to introduce you to the use of conditional programming. Be sur
Columbus State University - CPSC - 1301
Chapter 6 User-Defined Functions 1Standard (Predefined) Functions (Appendix E &amp; F) abs(x) ceil(x) cos(x) exp(x) fabs(x) floor(x) pow(x,y) tolower(x) toupper(x) User-Defined Functions Value returning Void functions 1) 2) 3) 4) name of function # of parame
Columbus State University - CPSC - 1301
Chapter 7 User-Defined Functions IIVOID FUNCTIONS void functionName(void) cfw_ statements ex. printStars (use single cout vs. loop) void functionName( formal parameter list) cfw_ statements print triangle of stars: void printStars (int blanks, int star
Columbus State University - CPSC - 1301
Chapter 4: Writing Classes (1) Lab ExercisesTopicsClasses and methodsLab ExercisesPrelab Exercises (in class) A Bank Account Class (submit) Tracking Grades (submit) A Band Booster Class (extra credit)Chapter 4: Writing Classes (1)1Prelab Exercises
Columbus State University - CPSC - 1301
CPSC1301L Computer Science I LabClass Meets: R 8:00-10:50 a.m. in Center for Commerce and Technology 208 Instructor(s): Dr. Wayne Summers Office: CCT 455 Office phone: (706) 568-5037 Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office
Columbus State University - CPSC - 1301
CPSC1301L Computer Science I LabClass Meets: R 8:00-10:50 a.m. in Center for Commerce and Technology 208 Instructor(s): Dr. Wayne Summers Office: CCT 455 Office phone: (706) 568-5037 Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office
Columbus State University - CPSC - 1301
CPSC1301 Computer Science IClass Meets: MWF 9:00-9:50 a.m. in Center for Commerce and Technology 208Instructor(s): Dr. Wayne Summers Office: CCT 455 Office phone: (706) 568-5037 Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office Hour
Columbus State University - CPSC - 1301
CPSC1301 Computer Science IClass Meets: MWF 9:00-9:50 a.m. in Center for Commerce and Technology 208Instructor(s): Dr. Wayne Summers Office: CCT 455 Office phone: (706) 568-3057 Department phone: (706) 568-2410 Department FAX: (706) 565-3529 Office Hour
Columbus State University - CPSC - 1301
Chapter 5: Conditionals and Loops Lab ExercisesTopicsBoolean expressions The if statement The switch statementLab ExercisesPreLab Exercises (in-class) Computing a Raise (in-class) A Charge Account Statement (submit) Activities at Lake LazyDays (submit
Columbus State University - CPSC - 1301
Chapter 5: Conditionals and Loops Lab ExercisesTopicsThe while statementLab ExercisesPreLab Exercises Counting and Looping (submit) A Guessing Game (submit) Finding Maximum and Minimum Values (extra credit) Using the Coin Class (submit)The for statem
Columbus State University - CPSC - 1301
CPSC 1301 Computer Science ICourse Description: This course includes an overview of computers and programming; problem solving and algorithm development; simple data types; arithmetic and logic operators; selection structures; repetition structures; text
Columbus State University - CPSC - 1301
Data Expressions(1) Java Programming Lab ExercisesTopicsVariables Constants AssignmentLab ExercisesPrelab Exercises Area and Circumference of a Circle Painting a RoomSubmitting your assignment in WebCT VistaYour task is to submit your assignment und
Columbus State University - CPSC - 1301
Chapter 2: Data and Expressions (2) Lab ExercisesTopicsHTML Applets ColorsLab ExercisesIntroduction to HTML Drawing Shapes Drawing a FaceChapter 2: Data and Expressions1Introduction to HTMLHTML is the HyperText Markup Language. It is used to descr
Columbus State University - CPSC - 1301
Introduction to Java Programming Lab ExercisesTopicsPrinting strings Syntax errorsLab ExercisesPrelab Exercises Poem Recognizing Syntax Errors Correcting Syntax ErrorsIntroduction1Prelab ExercisesYour task is to write a Java program that will prin
Columbus State University - CPSC - 1301
CPSC 1301 Computer Science 1 lecture November 16 (lab) o Answer student questions about last weeks lab assignments o Review the two programs for this weeks lab November 17 o Briefly introduce Arrays from Chapter 7 [20 minutes] o 7.1 Array Elements discuss
Columbus State University - CPSC - 1301
CPSC 1301 Computer Science 1 lecture October 9 o Review Midterm Exam o Answer student questions about Midterm, etc. o Introduce Chapter 5 Conditionals and Loops o 5.1 Boolean Expressions Define flow of control Define conditional statement (selection state
Columbus State University - CPSC - 1301
Chapter 6: Object-Oriented Design (1) Lab ExercisesTopicsParameter Passing Method Decomposition Overloading Static Variables and MethodsLab ExercisesChanging People (submit) A Modified MiniQuiz Class (submit) A Flexible Account Class (submit) Opening
Columbus State University - CPSC - 1301
Chapter 6: Object-Oriented Design (2) Lab ExercisesTopicsOverall class design GUI LayoutsLab ExercisesRandom Walks Telephone KeypadChapter 6: Object-Oriented Design1Random WalksIn this lab you will develop a class that models a random walk and wri
Columbus State University - CPSC - 1301
Orientation Lab ExercisesTopicsFamiliarization with labLab ExercisesComputer Hardware Logging onto CSU Network Logging into WebCT Vista Locating Java Write a simple program Write a simple program Compile and run a program in DOSIntroduction to Crimso
Columbus State University - CPSC - 1301
Chapter 3: Using Classes and Objects Lab ExercisesTopicsString Class Random ClassLab ExercisesPrelab Exercises Working with Strings Rolling DiceChapter 3: Using Classes and Objects1Prelab Exercises Sections 3.2-3.5These exercises focus on the Stri
Columbus State University - CPSC - 1301
Chapter 3: Using Classes and Objects (2) Lab ExercisesTopicsEnumerated Types Panels Wrapper Classes Formatting ClassesLab ExercisesPlaying with Cards (required) Nested Panels (required) Experimenting with the Integer Class (extra credit) Formatting Ou