1 / 8

Boolean algebra

Boolean algebra. Logic Variables • Different names for the same thing Logic variables Binary variables Boolean variables • Can only take on 2 values, e.g., TRUE or False ON or OFF 1 or 0.

telma
Download Presentation

Boolean algebra

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Boolean algebra

  2. Logic Variables • Different names for the same thing • Logic variables • Binary variables • Boolean variables • Can only take on 2 values, e.g., • TRUE or False • ON or OFF • 1 or 0

  3. One of the primary requirements when dealing with digital circuits is to find ways to make them as simple as possible. • This constantly requires that complex logical expressions be reduced to simpler expressions that produce the same results under all possible conditions. • The simpler expression can then be implemented with a smaller, simpler circuit, which in turn saves the price of the unnecessary gates, reduces the number of gates needed, and reduces the power and the amount of space required by those gates. • One tool to reduce logical expressions is the mathematics of logical expressions - Boolean Algebra. George Boole (1815 – 1864) was an English mathematician, philosopher and logician.

  4. The rules of Boolean Algebra are simple and straight-forward, and can be applied to any logical expression. • The resulting reduced expression can then be readily tested with a Truth Table, to verify that the reduction was valid.

  5. The Boolean data type is the primary result of conditional • statements - features of a programming language which perform • different computations or actions depending on whether a • programmer specified Boolean condition evaluates to true or false. • This is always achieved by selectively altering the control • flow(the order in which the individual statements, instructions or • Functioncalls of an imperative or a declarative programme are • executed orevaluated) based on some condition.

  6. In programming languages that have a built-in Boolean data • type, e.g. Pascal and Java, the comparison operators such as > • and ≠ are usually defined to return a Boolean value. • Conditional and iterative commands may be defined to test • Boolean-valued expressions.

  7. Languages without an explicit Boolean data type, e.gLISP, may still represent truth values by some other data type. • LISP uses an empty list for false, and any other value for true. • A Boolean variable may be regarded (and be implemented) as a numerical variable with a single binary digit (bit), which can store only two values. • The implementation of Booleans in computers are most likely represented as a full byte, rather than a bit; this is usually due to the ways computers transfer blocks of information. • Most programming languages, even those that do not have an explicit Boolean type, have support for Boolean algebraic operations such as conjunction (AND, &, *), disjunction (OR, |, +), equivalence (EQV, =, ==), exclusive or non-equivalence (XOR, NEQV, ^, !=), and not (NOT, ~, !).

  8. LISP – a computer programming language developed about 1960 by John McCarthy at theMIT. • LISP was founded on the mathematical theory of recursive functions (in which a function appears in its own definition). • A LISP programme is a function applied to data, rather than being a sequence of procedural steps as in FORTRAN and ALGOL. • LISP uses a very simple notation in which operations and their operands are given in a parenthesised list. • e.g. (+ a (* bc)) stands for a + b*c. • Although this appears awkward, the notation works well for computers. • LISP became a common language for artificial intelligence (AI) programming, partly owing to the confluence of LISP and AI work at MIT and partly because AI programmes capable of “learning” could be written in LISP as self-modifying programmes.

More Related