Upcoming SlideShare
×

Ch 4 structure of algorithms

460 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
460
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
5
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ch 4 structure of algorithms

1. 1. Boolean Logic
2. 2. George Boole <ul><li>In1854, George Boole published “ An investigation into the Laws of Thought, on which are founded the Mathematical Theories of Logic and Probabilities.” </li></ul><ul><li>Boole outlined a system of logic and a corresponding algebraic language dealing with true and false values. </li></ul>100 th Anniverary Edition
3. 3. Boolean Logic <ul><li>Boolean logic is a form of mathematics in which the only values used are true and false. </li></ul><ul><li>Boolean logic is the basis of all modern computing. </li></ul><ul><li>There are three basic operations in Boolean logic – AND, OR, and NOT. </li></ul>100 th Anniverary Edition
4. 4. The AND Operation <ul><li>The AND operation is a binary operation, meaning that it needs two operands. </li></ul><ul><li>c = a AND b </li></ul><ul><li>Both a and b must be true for the result to be true. </li></ul>100 th Anniverary Edition F F F F T T b F T a AND
5. 5. The OR Operation <ul><li>The OR operation is also a binary operation with two operands. </li></ul><ul><li>c = a OR b </li></ul><ul><li>If either a OR b is true, then the result is true. </li></ul>100 th Anniverary Edition F T F T T T B F T a OR
6. 6. The NOT Operation <ul><li>The NOT operation is a unary operation with only one operand. </li></ul><ul><li>c = NOT (a) </li></ul><ul><li>It simply reverses the true or false value of the operand. </li></ul>100 th Anniverary Edition T F F T a NOT