{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lecture_08 - ECE 190 Lecture 08 Programming in LC-3 machine...

This preview shows pages 1–4. Sign up to view the full content.

ECE 190 Lecture 08 September 15, 2011 1 V. Kindratenko Programming in LC - 3 machine language Lecture Topics Programming using systematic decomposition Debugging Lecture materials Textbook Ch. 6 Homework/Projects MP1 is due next Wednesday Lab 4 is due next Monday Announcements Exam 1 is on Mon, Sept. 26 , 7-9:30pm It is designed to be a <90 minutes exam for a well-prepared student We give you up to 2.5 hours to complete it Let us know if you have a conflict by next Wednesday via a quiz on Compass Check https://wiki.engr.illinois.edu/display/ece190/Exams for updates Exams from prior years are posted here as well Exam topics include everything covered in lectures 1-9

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

View Full Document
ECE 190 Lecture 08 September 15, 2011 2 V. Kindratenko Programming using systematic decomposition Systematic decomposition In order for electrons to solve a problem for us, we need to go through several levels of transformation to get o from the natural language in which the problem statement is initially expressed o to the level at which electrons can be manipulated to do the work for us Problem statement Algorithm Program Problem statement can be imprecise, thus, we first translate it into a precise algorithm which should have the following 3 properties: o finiteness (it terminates) o definiteness (each step is precisely stated) o effective computability (each step can be carried out by the computer) to start with the problem statement and end up with a working program, we will apply a process referred to as systematic decomposition or stepwise refinement o complex tasks are systematically broken down into simpler, smaller tasks such that the collection of these simpler tasks, or units of work, will accomplish the same as the original task o the decomposition continues until each simpler task can be implemented as just a few instructions in the programming language we use Three constructs We want to replace a large unit of work with a set of a few smaller units of work. task to be decomposed This can be done using one of the 3 basic constructs: sequential, conditional, and iterative Sequential construct o Is used when we can decompose a given task into two smaller sub-tasks, such that one