Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science: A Structured Programming Approach Using C1 14-4 Masks In many programs, bits are used as binary flags: 0 is off, and 1 is on. To set.

Similar presentations


Presentation on theme: "Computer Science: A Structured Programming Approach Using C1 14-4 Masks In many programs, bits are used as binary flags: 0 is off, and 1 is on. To set."— Presentation transcript:

1 Computer Science: A Structured Programming Approach Using C1 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. Creating Masks Using Masks Topics discussed in this section:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

17 Computer Science: A Structured Programming Approach Using C17 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. Payroll Case Study Structure Chart Design Topics discussed in this section:

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

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

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

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

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

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

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


Download ppt "Computer Science: A Structured Programming Approach Using C1 14-4 Masks In many programs, bits are used as binary flags: 0 is off, and 1 is on. To set."

Similar presentations


Ads by Google