Boolean logic examples

Boolean logic is vital to all computer technology, not just spreadsheet programs, and rests on the concept that all values can be reduced to either TRUE or FALSE —or, because computer technology is based on the binary number system, either 1 or 0.

Boolean values in spreadsheet programs are most often created using the logical group of functions such as the IF function, the AND function, and the OR function.

In these functions, Boolean values are the input source for one of the function's argumentsor they can form the output or results of a function that is evaluating other data in the worksheet. As a result:. To have Boolean values included in the calculations of arithmetic functions, you must first convert them to numeric values before passing them to the function. Two ways of accomplishing this step are to:. Unlike arithmetic functions, formulas in Excel and Google Sheets that carry out arithmetic operations such as addition and subtraction are happy to read Boolean values as numbers without the need for conversion.

As a result, the addition formula in row 6 in the example image. Tweet Share Email. These instructions apply to Excel versions, and Excel for Microsoft More from Lifewire.In mathematics and mathematical logicBoolean algebra is the branch of algebra in which the values of the variables are the truth values true and falseusually denoted 1 and 0, respectively. It is thus a formalism for describing logical operationsin the same way that elementary algebra describes numerical operations.

It is also used in set theory and statistics. A precursor of Boolean algebra was Gottfried Wilhelm Leibniz 's algebra of concepts. Leibniz's algebra of concepts is deductively equivalent to the Boolean algebra of sets. Boole's algebra predated the modern developments in abstract algebra and mathematical logic ; it is however seen as connected to the origins of both fields. In fact, M. Stone proved in that every Boolean algebra is isomorphic to a field of sets.

In the s, while studying switching circuitsClaude Shannon observed that one could also apply the rules of Boole's algebra in this setting, [8] and he introduced switching algebra as a way to analyze and design circuits by algebraic means in terms of logic gates. Shannon already had at his disposal the abstract mathematical apparatus, thus he cast his switching algebra as the two-element Boolean algebra.

boolean logic examples

In modern circuit engineering settings, there is little need to consider other Boolean algebras, thus "switching algebra" and "Boolean algebra" are often used interchangeably. Efficient implementation of Boolean functions is a fundamental problem in the design of combinational logic circuits.

Modern electronic design automation tools for VLSI circuits often rely on an efficient representation of Boolean functions known as reduced ordered binary decision diagrams BDD for logic synthesis and formal verification. Logic sentences that can be expressed in classical propositional calculus have an equivalent expression in Boolean algebra. Thus, Boolean logic is sometimes used to denote propositional calculus performed in this way.

Although the development of mathematical logic did not follow Boole's program, the connection between his algebra and logic was later put on firm ground in the setting of algebraic logicwhich also studies the algebraic systems of many other logics. The closely related model of computation known as a Boolean circuit relates time complexity of an algorithm to circuit complexity.

Whereas expressions denote mainly numbers in elementary algebra, in Boolean algebra, they denote the truth values false and true. These values are represented with the bits or binary digitsnamely 0 and 1.

A sequence of bits is a commonly used for such functions. Another common example is the subsets of a set E : to a subset F of Eone can define the indicator function that takes the value 1 on Fand 0 outside F. The most general example is the elements of a Boolean algebrawith all of the foregoing being instances thereof. As with elementary algebra, the purely equational part of the theory may be developed, without considering explicit values for the variables.

One might consider that only negation and one of the two other operations are basic, because of the following identities that allow one to define conjunction in terms of negation and the disjunction, and vice versa De Morgan's laws :.

Boolean algebra

The three Boolean operations described above are referred to as basic, meaning that they can be taken as a basis for other Boolean operations that can be built up from them by composition, the manner in which operations are combined or compounded.Did you also know you can also string conditions together to create more complex conditions?

These three operators are used for the most common aspects of Boolean logic. Where clauses become really interesting when we consider combining more than one field to filter a result. This could be written as. In SQL we can string a where clause together using to test multiple fields. Here is the Truth table for the OR operator.

Multiple OR clauses can be connected together to behave similar to the IN statement. In this manner they act as a membership condition. The not operator takes a condition and changes it to the opposite. Some examples of expressions using the NOT statement include:. However, to explain this, we first need to understand which order the conditions are evaluated and how to group them together.

In other words, we need to learn about parenthesis and used them much in the same way you would use them with adding and multiplying numbers.

Back to Basics: What is Boolean Logic?

Much like in arithmetic, where multiplication occurs before additions, in Boolean operators, AND is evaluated before OR. Notice the use of parenthesis, the condition within the parenthesis are evaluated first, then the NOT condition second. Suppose we need to find all large OrdersDetails. How would we go about this? Lets try. I added the parenthesis to for the or statements to be evaluated before the AND; otherwise the statement would have a different result.

You just learned how to use multiple conditions to create more sophisticated filtering conditions. What other topics would you like to know more about? Kris Wenzel has been working with databases over the past 28 years as a developer, analyst, and DBA.

boolean logic examples

Kris has written hundreds of blog articles and many online courses. He loves helping others learn SQL. AND instead of OR is needed. Great tutorials, really looking forward to the next ones.

If only you could watch out more for typos. There was a ridiculous amount in this one. That makes my day!At the heart of Boolean Logic is the idea that all values are either true or false. Within the Lotame platformthe use of Boolean Logic allows for the creation of more complex audience definitions, allowing for audiences to be built to a very specific set of definitions. This article explores the uses of individual Boolean operators and how they relate to building audiences.

For example, to build an audience which encompasses anyone who enjoys Mexican, Chinese, or French Cuisine, the following audience definition would apply:. In the event that a client were building an audience and wanted to target only users who had shown an affinity for Sports Cars and Fishing and History, the following audience definition would apply:.

For example, to create an audience of users over the age of 18 NOT years of age with a demonstrated interest in movies, the following audience definition would be used:. Want to learn more?

boolean logic examples

Get in Touch With Lotame Today. With Lotame, data organization is as simple as arranging files on your computer hard drive.

Audience enrichment takes your first party data i.

boolean logic examples

Privacy Center Careers Request a Demo. Back to Basics: What is Boolean Logic? November 5, What is Boolean Logic? Learn more about a DMP in this short video: Want to learn more? What is first party data, how is it collected, and how can you use it…. Data Organization: The Building Blocks for Audience Creation With Lotame, data organization is as simple as arranging files on your computer hard drive. Back to Basics: What is Audience Enrichment? Ready to Get Started? Fill in this form and a member of the Lotame team will be in touch.

Yemen Zambia Zimbabwe. We use our own and third-party cookies to improve your experience and our services.To keep these theorems in memory is not that easy since there exist several of them. To simplify the procedure, we suggest that the student especially one who is writing an examination first find the correct solution using an appropriate K-map.

Once we have the answer with us, we can proceed to solve the problem algebraically. As an example, we solve Example 6 assuming the RHS part is not given using this method.

To find the answer i. Next we draw K-map M 2 as shown in Fig. E5b and remove the first encirclements. Knowing the answer in advance, we can prepare our strategy accordingly to solve the problem. To prove these laws, we make use of truth tables: Table E14a is used to prove the first law.

It can be observed that the entries in the rightmost two columns are the same; this proves the first law. The entries related to the second law are as shown in the table. As in the first case, in this case also the entries in the rightmost two columns are the same, which proves the second law.

The law can be proved using the truth table E We find that the first and last columns agree with each other, which proves the law.

This relation can be derived from Table E17a, the truth table for the OR function. It is to be noted that it is the XOR operation and not the OR operation that really represents the algebraic addition of two bits. This relation is derived from the truth table for the OR function as shown below. EXNOR represents the complementary operation of the algebraic addition of two bits.

We find that f x and F x are equally valid functions and duality is a special property of Boolean binary algebra. The property of duality exists in every stage of Boolean algebra.

For example, positive and negative logic schemes are dual schemes. We now state that every rule and law applicable to a positive-logic scheme is applicable to its corresponding negative- or, complementary- logic scheme also. The definition given above may also be considered as the duality theorem. In this context, we may define duality as the state of being dual.

Further, the reduction has been performed based on hunches and previous experience. Experiences and difficulties of this kind led to the development of the K-map and QM methods of Boolean reduction. He is a person who wants to implement new ideas in the field of Technology. Here we are going to discuss about what is electronics. In my experience, when I ask what is electronics there is a tendency for many ones Menu bar. Theme images by Storman.Granted, there are other ways to search a spreadsheet, including Lookup functions and pivot tables.

The reason to bone up on Boolean logic is because it's a method you can use in other applications, like search engines and databases. We'll walk you through all four. Boolean operators may start out looking simple. When combined with other functions, however, such as IF statements, you can create some complex formulas that produce very powerful results.

When you're trying to find something that meets multiple criteria, AND is your operator.

Excel Boolean logic: How to sift spreadsheet data using AND, OR, NOT, and XOR

In order to fit the costumes, the new guy must be 68 to 69 inches tall, must weigh between and pounds, and must be aged between 30 and But the Guild Actors database contains 20, records, so he needs a faster way to narrow the search. For this query, you can use one of the following three formulas. Copy the database and formulas shown in figure 02 and experiment with the results. In this case, if any of the AND statements are not met, the response will return False and the multiplication asterisk result will be 0 False.

This format often appears when your syntax has an error and Excel repairs it after asking you if you would like assistance. Note: Notice how Excel color-codes the formulas to the matching cells, including the opening and closing parentheses, in an effort to help you understand the syntax of each condition in the formula.

The first database search returned actors. George wants to narrow the results further, so he queries those results for two very specific skills: This actor must speak fluent Italian or French AND have a vocal range of tenor or bass. Copy the database and formulas shown in figure 03 and experiment with the results.

đź’» - See How Computers Add Numbers In One Lesson

Once again, note how Excel color-codes the formulas to the matching cells, including the opening and closing parentheses, in an effort to help you understand the syntax of each condition in the formula. The easiest way to explain the NOT operator is to compare it to an Internet search. If you searched online for your old friend Jack Russell just by typing his name, you'd get hundreds of hits for dogs and puppies, too.

George needs some background performers to dance and play a variety of instruments—but not the piano, because pianists can't dance around, and not ballroom dancing, because he wants them to dance with their instruments, not with human partners. Same situation for record 4 Piter De Vriespiano, waltz. Since only one is acceptable and not both, both are rejected.

Boolean Algebra and Logic Simplification Examples

Use the following formula for this query, then copy the database shown in figure 04 and experiment with the results. Use the following formula for this query and then copy the database shown in figure 05 and experiment with the results.

Once you get comfortable with Boolean operators, you have a new skill for finding specific records in a sea of cells. Better yet, you can branch out to use Boolean logic to to refine Internet searches, database searches, and more. JD Sartain is a technology journalist from Boston. Rob Schultz. Excel allows a maximum of arguments in a single logical function, but only if the formula does not exceed 8, characters.

JD Sartain 01 Boolean logical operators defined Boolean operators may start out looking simple.A Boolean search, in the context of a search engineis a type of search where you can use special words or symbols to limit, widen, or define your search.

When you include an operator in a Boolean search, you're either introducing flexibility to get a wider range of results, or you're defining limitations to reduce the number of unrelated results. Most popular search engines support Boolean operators, but the simple search tool you'll find on a website probably doesn't.

George Boole, an English mathematician from the 19th century, developed an algebraic method that he first described in his book, The Mathematical Analysis of Logic and expounded upon in his An Investigation of the Laws of Thought Boolean algebra is fundamental to modern computing, and all major programming languages include it.

It also figures heavily in statistical methods and set theory. Today's database searches are largely based on Boolean logic, which allows us to specify parameters in detail—for example, combining terms to include while excluding others.

Given that the internet is akin to a vast collection of information databases, Boolean concepts apply here as well. For the purposes of a Boolean web search, these are the terms and symbols you need to know:.

Most search engines default to using the OR Boolean operator, meaning that you can type a bunch of words and it will search for any of them, but not necessarily all of them. Not all search engines support these Boolean operators. For example, Google understands - but doesn't support NOT. Learn more about Boolean searches on Google for help. When you perform a regular search, such as dog if you're looking for pictures of dogs, you'll get a massive number of results.

A Boolean search would be beneficial here if you're looking for a specific dog breed or if you're not interested in seeing pictures for a specific type of dog. Instead of just sifting through all the dog pictures, you could use the NOT operator to exclude pictures of poodles or boxers. A Boolean search is particularly helpful after running an initial search.

For instance, if you run a search that returns lots of results that pertain to the words you entered but don't actually reflect what you were looking for, you can start introducing Boolean operators to remove some of those results and explicitly add specific words. But then you want to remove the results that have water, so you add -water. Immediately, you've cut down likely millions of results.

Below are some more examples of Boolean operators. Remember that you can combine them and utilize other advanced search options such as quotes to define phrases. Helps find free games by including both words. Searches for video chat apps that can run on both Windows and iOS devices.

Locate open houses that are open either day.

This entry was posted in Boolean logic examples. Bookmark the permalink.

Responses to Boolean logic examples

Leave a Reply

Your email address will not be published. Required fields are marked *