Computer Science  >  QUESTIONS & ANSWERS  >  Engineering & Technology Computer Science Write the truth table for boolean expression, p1 || (!(p (All)

Engineering & Technology Computer Science Write the truth table for boolean expression, p1 || (!(p2 && p3) && p4). Write the expression (prove with truth table) to build a ham sandwich with...

Document Content and Description Below

Question Answered step-by-step 1. Write the truth table for boolean expression, p1 || (!(p2 && p3) && p4). 2. Write the expression (prove with truth table) to build a ham sandwich with or without ... egg. p1, egg p2, ham p3, bread For example, expression, (p2 && p3 && ~p1), will build a ham sandwich without egg Reference: Not operation, ! true -> !(true) -> false false -> !(false) -> true Comparator, age = 24 age > 18 -> 24 > 18 -> true !(24 > 18) -> !(true) -> false age = 17 age > 18 -> 17 > 18 -> false !(false) -> true age <= 18 -> 17 <= 18 -> true weight = 140 (weight < 140) -> 140 < 140 -> false AND Operation, && age = 24, weight =140 (age > 18) && (weight < 140) -> (24 > 18) && (140 < 140) -> true && false -> false Truth Table, variables (true/false), all combination of possible conditions. p1, p2 -> 2 boolean variable, the total possible combination will be 2^2 = 4 p1, p2, p3 -> 2 boolean variable, the total possible combination will be 2^3 = 2*2*2 = 8 p1, p2,...pn -> n bollean variable, the total possible combination will b 2^n p1 p2 p1 && p2 0 0 0 0 1 0 1 0 0 1 1 1 p1 && p2 && p3 -> (p1 && p2) && p3 p1 p2 p3 (p1 && p2)->x (x && p3) 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 1 1 OR operation, age = 24, weight =140 (age > 18) || (weight < 140) -> (24 > 18) || (140 < 140) -> true || false -> true p1 p2 p1 || p2 0 0 0 0 1 1 1 0 1 1 1 1 p1 || p2 || p3 -> (p1 || p2) || p3 p1 p2 p3 (p1 || p2)->x (x || p3) p1 || p2 || p3 (lazy evaluation) 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 (p1 && p2) || p3 p1 p2 p3 (p1 && p2)->x (x || p3) 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 1 (p1 || p2) && p3 p1 p2 p3 (p1 || p2)->x (x && p3) 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 p3, bread p1, egg p2, ham expression to build a sandwich, (p1 || p2) && p3 Cereal Milk, (C || M) && M 0 0 0 0 1 1 1 0 0 1 1 1 [Show More]

Last updated: 3 years ago

Preview 1 out of 4 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of Engineering & Technology  Computer Science  Write the truth table for boolean expression, p1 || (!(p2 && p3) && p4). Write the expression (prove with truth table) to build a ham sandwich with... document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$8.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

176
0

Document information


Connected school, study & course


About the document


Uploaded On

Jul 20, 2021

Number of pages

4

Written in

All

Seller


Profile illustration for Cheryshev
Cheryshev

Member since 4 years

102 Documents Sold

Reviews Received
6
4
1
0
1
Additional information

This document has been written for:

Uploaded

Jul 20, 2021

Downloads

 0

Views

 176

Document Keyword Tags


$8.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·