1 / 9

L8:Flowcharting a program

Learn the fundamentals of flowcharting in ECE, including symbols, examples, loops, and problem-solving techniques. Understand how to document algorithms and processes graphically. Discover how flowcharts can represent assembler language and hierarchy.

jamieson
Download Presentation

L8:Flowcharting a program

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECE 2560 L8:Flowcharting a program Department of Electrical and Computer Engineering The Ohio State University ECE 3561 - Lecture 1

  2. Flowcharting • Where does flowcharting come in? • Flowcharting symbols and examples • Flowcharting a program ECE 3561 - Lecture 1

  3. What is flowcharting • Flowcharting is a method of documenting an algorithm or method for performing a sequence of actions. • Could be something that is not intended for a computer program. • Provides a graphical view of the process or method. • For assembler language can even indicate register and memory usage ECE 3561 - Lecture 1

  4. Flowcharting symbols • Straight action (or code sequence) • Enclosed in a box – sequence of code goes in the box. • Example – exchange 2 items • A - -> Temp • B - -> A • Temp - -> B ECE 3561 - Lecture 1

  5. Flowcharting symbols • Decision structure • Example • dec I • jge yes • Code for false branch • jmp after • yes Code for true branch • after code that follows structure ECE 3561 - Lecture 1

  6. Flowcharting loops • A for loop • For I = 1 to 10 Loop • code in loop • End loop; ECE 3561 - Lecture 1

  7. Flowchart for a problem • We considered multiply routine (note: different register numbers used here) • Note symbol for subroutine and enter/return ECE 3561 - Lecture 1

  8. Other flowchart symbols • Have seem actions, decision, subprocess, enter/return • A couple of others that are often used ECE 3561 - Lecture 1

  9. Flowchart hierarcy • Flowchart can be written such that what is in the action (process) box is a high level statement. • The high level statement can be a program in and of itself • OR • A flowchart can be done indicating assembler instructions and which registers are used. ECE 3561 - Lecture 1

More Related