Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number Systems Instructions, Compression & Truth Tables.

Similar presentations


Presentation on theme: "Number Systems Instructions, Compression & Truth Tables."— Presentation transcript:

1 Number Systems Instructions, Compression & Truth Tables.

2 Instructions A computer program consists of a series of instructions that are coded as bit patterns; the process of running a program is outlined below: To run a computer program, the CPU fetches the first instruction and decodes it. The CPU updates the program counter to keep track of the next instruction. The CPU then processes the decoded program instruction which consists of an operator/opcode (the instruction) and an operand (the data or address). The process is then repeated as the next instruction is fetched.

3 Instructions 00110010 10001000 An example of an instruction is below:
Operator/opcode operand Here the operator could be instructing the computer to multiply and the operand would be stating the value (in this case 136). Note: This could also mean multiply the contents of memory location 136 rather than the value 136.

4 Instructions Data and instructions are both in binary form and are held in main memory in unique addresses, so the operating system ensures that instructions and data are stored in the expected locations when the program runs. By storing the instructions and data in separate locations this ensures that the CPU is able to differentiate between data or instruction.

5 Past Paper Question

6 Past Paper Question

7 Past Paper Question

8 Past Paper Question – Mark Scheme

9 Compression Compression is the process of making a file smaller. The advantages are stated below: More data may be stored on the disk. More data may be stored on secondary storage. Files may be transferred more quickly Files may be downloaded quickly from the internet. Easier to send files as attachments

10 Lossy & Lossless Compression
Compresses file size by discarding some of the data. Lossy loses quality of file but file size can be smaller as a result. Common in images or multimedia (sound & video), particularly where applications stream media over the internet.

11 Lossy & Lossless Compression
Uses an algorithm to compress data but it can in turn be de- compressed at any time, returning to original quality. Commonly used on text or program files where we can not simply discard some of the characters. Imagine if some key words were removed from your programming project during compression!

12 Past Paper Question

13 Truth Tables AND, OR, NOT NOT – Output is opposite of input, e.g. 1 becomes 0 AND – Both inputs must be 1 for output of 1. OR – Either input must be 1 for output to be 1.

14 Truth Tables AND, OR, NOT Input (A) Output (NOT A) 1

15 Truth Tables AND, OR, NOT Input (A) Input (B) Output (A AND B) 1

16 Truth Tables AND, OR, NOT Input (A) Input (B) Output (A OR B) 1

17 Truth Tables AND, OR, NOT a b a OR b NOT (a OR b) 1
When combining different operators the truth table is expanded as shown below: a b a OR b NOT (a OR b) 1

18 Truth Tables AND, OR, NOT a b a AND b NOT (a AND b) 1


Download ppt "Number Systems Instructions, Compression & Truth Tables."

Similar presentations


Ads by Google