state - CS1372 CS1372: HELPING TO PUT THE COMPUTING IN ECE...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE CS1372 State/State Machines
Background image of page 1

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

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE Aside: the break instruction int i; for(i=0; i<10; i++) { if(i == 5) break; }
Background image of page 2
CS1372: HELPING TO PUT THE COMPUTING IN ECE Aside: the break instruction int type = 0; switch(type) { case 1: // case 1 occurs here break; case 2: // add case 2 stuff case 3: case 4: // cases 2, 3 and 4 break; default: // catch-all for errors break; }
Background image of page 3

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

View Full DocumentRight Arrow Icon
CS1372: HELPING TO PUT THE COMPUTING IN ECE Better: labeling types Typedef enum {IGNORE, BORING, OK, GOOD, BEST} TYPE; TYPE type; switch(type) { case BORING: // case 1 occurs here break; case OK: // add case 2 stuff case GOOD: case BEST: // cases 2, 3 and 4 break; default: // catch-all for errors break; }
Background image of page 4
CS1372: HELPING TO PUT THE COMPUTING IN ECE State Machines State Machines are a really important concept for ECE students You will learn how to make them in hardware since they control the brain of
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 10

state - CS1372 CS1372: HELPING TO PUT THE COMPUTING IN ECE...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online