Alice chap 5 - 5 BOOLEAN LOGIC IN PROGRAMMING After...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
After finishing this chapter, you should be able to: o Provide a brief definition of each the following terms: American Standard Code for Information Interchange (ASCII), AND, Boolean algebra, Boolean function, Boolean logic, collate, collating sequence, logical comparison operators, NOT, OR, proximity function, and Unicode o Describe the function of the Boolean operations AND, OR, and NOT, and show how they are used in Alice branching and looping instructions o List and describe the function of the six logical comparison operators, and show how they are used to form Boolean conditions in Alice o Describe what a Boolean function is and how such functions are used in Alice o Create new methods in Alice that use Boolean conditions involving random numbers, Boolean functions, and method parameters BOOLEAN LOGIC IN PROGRAMMING 1 5
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Chapter 5 • Boolean Logic in Programming BOOLEAN LOGIC Branching and looping routines both contain conditions that are either true or false. In 1854, George Boole, the first Professor of Mathematics at Queen’s College in Cork, Ireland, published a book titled “ An investigation into the Laws of Thought, on which are founded the Mathematical Theories of Logic and Probabilities.” Boole outlined a system of logic and a corresponding algebraic language dealing with true and false values. Today that type of logic is called Boolean logic, and his language is called Boolean algebra . The conditions that exist in branching and looping routines are a form of Boolean logic. Boolean Logic is the basis for all modern digital electronic technology. The howstuffworks.com Website has an article about how computers implement Boolean logic at http://computer.howstuffworks.com/boolean.htm . In 1858 Boole’s original book was repub- lished as “An Investigation of the Laws of Thought”. Copies of the 1973 reprint of this edition can still be found in many bookstores and online. The complete text of an 1848 paper by Boole titled the Calculus of Logic , is available on the Web at: http://www.maths.tcd.ie/pub/HistMath/ People/Boole/CalcLogic . The site is maintained by the University of Dublin’s Trinity College School of Mathematics. They also maintain links to information about George Boole at http://www.maths.tcd.ie/pub/HistMath/People/Boole . Boolean logic is a form of mathematics in which the only values used are true and false. There are three basic operations in Boolean logic – AND, OR, and NOT, as described in Figure 5-1. The AND and OR operations are binary operations, meaning that they need two operands. Basically, when two values are combined in the AND operation, the result is true only if both values are true. Otherwise, the result is false. In the OR operation, if either value is true, then the result is true. The
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/17/2011 for the course CIS 106 taught by Professor Alice during the Spring '11 term at Community College of Philadelphia.

Page1 / 30

Alice chap 5 - 5 BOOLEAN LOGIC IN PROGRAMMING After...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online