Download
14 4 masks n.
Skip this Video
Loading SlideShow in 5 Seconds..
14-4 Masks PowerPoint Presentation

14-4 Masks

0 Views Download Presentation
Download Presentation

14-4 Masks

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. 14-4 Masks In many programs, bits are used as binary flags: 0 is off, and 1 is on. To set and test the flags, we use a bit mask. A mask is a variable or constant, usually stored in a byte or short integer. The bits are numbered from the least significant bit (rightmost), starting at 0. Topics discussed in this section: Creating Masks Using Masks Computer Science: A Structured Programming Approach Using C

  2. FIGURE 14-5 Bit Mask in a 16-bit Integer Computer Science: A Structured Programming Approach Using C

  3. PROGRAM 14-9 Determine Network Address Computer Science: A Structured Programming Approach Using C

  4. PROGRAM 14-9 Determine Network Address Computer Science: A Structured Programming Approach Using C

  5. PROGRAM 14-9 Determine Network Address Computer Science: A Structured Programming Approach Using C

  6. PROGRAM 14-9 Determine Network Address Computer Science: A Structured Programming Approach Using C

  7. PROGRAM 14-10 Determine Last Address in a Network Computer Science: A Structured Programming Approach Using C

  8. PROGRAM 14-10 Determine Last Address in a Network Computer Science: A Structured Programming Approach Using C

  9. PROGRAM 14-10 Determine Last Address in a Network Computer Science: A Structured Programming Approach Using C

  10. PROGRAM 14-10 Determine Last Address in a Network Computer Science: A Structured Programming Approach Using C

  11. FIGURE 14-6 Polynomial Coefficients Computer Science: A Structured Programming Approach Using C

  12. FIGURE 14-7 Polynomial Division Computer Science: A Structured Programming Approach Using C

  13. PROGRAM 14-11 Polynomial Division Computer Science: A Structured Programming Approach Using C

  14. PROGRAM 14-11 Polynomial Division Computer Science: A Structured Programming Approach Using C

  15. PROGRAM 14-11 Polynomial Division Computer Science: A Structured Programming Approach Using C

  16. PROGRAM 14-11 Polynomial Division Computer Science: A Structured Programming Approach Using C

  17. 14-5 Software Engineering In Chapter 12, we looked at what makes a good function. In this section, we look at how you design good programs. Topics discussed in this section: Payroll Case Study Structure Chart Design Computer Science: A Structured Programming Approach Using C

  18. FIGURE 14-8 Requirements for Payroll Case Study Computer Science: A Structured Programming Approach Using C

  19. FIGURE 14-8 Requirements for Payroll Case Study (continued) Computer Science: A Structured Programming Approach Using C

  20. FIGURE 14-8 Requirements for Payroll Case Study (continued) Computer Science: A Structured Programming Approach Using C

  21. Note Good programs start with a good structure chart design. Computer Science: A Structured Programming Approach Using C

  22. FIGURE 14-9 Afferent, Efferent, and Transform Modules Computer Science: A Structured Programming Approach Using C

  23. Table 14-8 Classification of Payroll Modules Computer Science: A Structured Programming Approach Using C

  24. FIGURE 14-10 Streams Computer Science: A Structured Programming Approach Using C