The Boolean operation **AND** is designed to reflect the truth or falsness of a statement formed by combining two smaller,or simpler, statements with the conjunction *and*.
Form of such statements : P AND Q
The inputs to the AND operation represent thetruth or falseness of te compound statement's components; the output represents the truth or falseness of the compound statement itself. It is true only when both of its components are true, whereas all other cases should produce an output of 0.
The AND operation
| AND | 0 | 1 |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 0 | 1 |
Form of OR statements : P OR Q
Such statements are true when at least one of their components is true, which agrees with the OR operation.
The OR operation
| OR | 0 | 1 |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 1 |
Form of XOR statements : P XOR Q
XOR produces an output of 1 when one of its inputs is 1 and the other is 0.
The XOR operation
| XOR | 0 | 1 |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 0 |

Gates provide the building blocks from which computers are constructed. As a result, Boolean logic and operators apear as fundamental operations in our programming languages.
A flip-flop is a fundamental unit of computer memory. It is circuit that produces an output value of 0 or 1, which remains constant until a pulse from another circuit causes it to shift to the other value.
Purposes in introducing the flip-flop circuit
stream : a long string of bits
Cause streams are difficult for human mind to comprehend, we usually use a shorthand notation called hexadecimal notation. It takes advantage of the fact that bit patterns within a machine tend to have lengths in multiples of four. To distinguish decimal number and non-decimal number, we will use the common prefix "0x" in front of our hexadecimal numbers.
