Introduction To Computing Systems
3rd Edition
ISBN: 9781260150537
Author: PATT, Yale N., Patel, Sanjay J.
Publisher: Mcgraw-hill,
expand_more
expand_more
format_list_bulleted
Question
Chapter 3, Problem 29E
Program Plan Intro
OR operation:
- OR function needs two inputs and produces one output.
- It is also known as binary logical function.
- If one of the inputs or both the inputs are “1”, then one-bit OR operation produces the output as “1”.
- If both the inputs are “0”, then OR operation produces the output “0”.
- The following diagram depicts the one-bit OR operation,
- The truth table for OR operation is as follows,
X | Y | Z=X OR Y |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
- In the above table, “X” and “Y” are the inputs, and “Z” is the output.
- In the above table, when “X=0”, and “Y=0”, the output “Z” is “0”, because both the inputs “X” and “Y” contains the value “0”.
- When “X=0”, and “Y=1”, the output “Z” is “1”, because one of the input “Y” contains the value “1”.
- When “X=1”, and “Y=0”, the output “Z” is “1”, because one of the input “X” contains the value “1”.
- When “X=1”, and “Y=1”, the output “Z” is “1”, because both the inputs “X” and “Y” contains the value “1”.
AND function:
- AND function needs two inputs and produces one output.
- It is also known as binary logical function.
- If one or both the inputs are “0”, then one-bit AND operation produces the output “0”.
- If both inputs are “1”, then AND operation produces the output as “1”.
- The following diagram depicts the AND operation,
- The truth table for AND operation is as follows,
X | Y | X AND Y |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
- In the above table, “X” and “Y” are inputs, and “Z” is output.
- When “X=0”, and “Y=0”, the output is “0”, because both the inputs “X” and “Y” contains the value “0”.
- When “X=0”, and “Y=1”, the output is “0”, because one of the input “X” contains the value “0”.
- When “X=1”, and “Y=0”, the output is “0”, because one of the input “Y” contains the value “0”.
- When “X=1”, and “Y=1”, the output is “1”, because both the inputs “X” and “Y” contains the value “1”.
NOR function:
- The NOR operation produces the output which is the negation of the result of “OR” operation.
- If one or both the inputs are “1”, then NOR operation produces the output as “0”.
- If both the inputs are “0”, then NOR operation produces the output “1”.
- The following diagram depicts the NOR operation,
- The truth table for NOR operation is as follows,
X | Y | Z=X OR Y |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
NAND function:
- The NAND operation produces the output which is the negation of the result of “AND” operation.
- If one or both the inputs are “0”, then NAND operation produces the output “1”.
- If both inputs are “0”, then NAND operation produces the output as “0”.
- The following diagram depicts the NAND operation,
- The truth table for NAND operation is as follows,
X | Y | X NAND Y |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Expert Solution & Answer

Want to see the full answer?
Check out a sample textbook solution
Students have asked these similar questions
What are the two errors in my pseudocode?Module getAverage(Integer value1, Integer value2, Integer value3)
Declare Integer average
average = value1 + value2 + value3 / 3
Display average
End Module
Where did I make an error in my pseudocode module???Code:Module main()
Call raiseToPower(2, 1.5)
End main
Module raiseToPower(Real value, Integer power)
Declare Real result
Set result = value ^ power
Display result
End raiseToPower
Why does my pseudocode not perform what I asked? Don't know whats wrong with it.// This program asks the user to enter a value
// between 1 and 10 and validates the input.
Declare Integer value
// Get a value from the user.
Display "Enter a value between 1 and 10."
Input value
// Make sure the value is between 1 and 10.
While value < 1 AND value > 10
Display "ERROR: The value must be between 1 and 10."
Display "Enter a value between 1 and 10."
Input value
End While
Chapter 3 Solutions
Introduction To Computing Systems
Ch. 3 - Prob. 1ECh. 3 - Replace the missing parts in the following circuit...Ch. 3 - A two-input AND and a two-input OR are both...Ch. 3 - Replace the missing parts in the following circuit...Ch. 3 - Complete a truth table for the transistor-level...Ch. 3 - For the transistor-level circuit in Figure 3.38,...Ch. 3 - Prob. 7ECh. 3 - The transistor-level circuit below implements the...Ch. 3 - What does the following transistor circuit do?
Ch. 3 - For what values of A, B, C, D, E, and F will the...
Ch. 3 - A student knew that an inverter contained one...Ch. 3 - The following logic diagram produces the logical...Ch. 3 - The following logic circuits consist of two...Ch. 3 - Fill in the truth table for the logical expression...Ch. 3 - Fill in the truth table for a two-input NOR...Ch. 3 - Prob. 19ECh. 3 - How many output lines will a 16-input multiplexer...Ch. 3 - Prob. 21ECh. 3 - Given the following truth table, generate the...Ch. 3 - Prob. 23ECh. 3 - Prob. 24ECh. 3 - Logic circuit 1 in Figure 3.39 has inputs A, B, C....Ch. 3 - You know a byte is eight bits. We call a four-bit...Ch. 3 - Prob. 28ECh. 3 - Prob. 29ECh. 3 - Say the speed of a logic structure depends on the...Ch. 3 - Recall that the adder was built with individual...Ch. 3 - For this question, refer to the figure that...Ch. 3 - Prob. 35ECh. 3 - A comparator circuit has two 1-bit inputs A and B...Ch. 3 - If a computer has eight-byte addressability and...Ch. 3 - Prob. 38ECh. 3 - Refer to Figure 3.21, the diagram of the...Ch. 3 - Given a memory that is addressed by 22 bits and is...Ch. 3 - Prob. 42ECh. 3 - Prob. 43ECh. 3 - Prob. 44ECh. 3 - Prob. 47ECh. 3 - Refer to Figure 3.32. Why are lights 1 and 2...Ch. 3 - Prob. 49ECh. 3 - We have learned that we can write one bit of...Ch. 3 - A student decided to design a latch as shown...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- What's wrong with my pseudocode? // The calcDiscountPrice function accepts an item’s price and // the discount percentage as arguments. It uses those // values to calculate and return the discounted price. Function Real calcDiscountPrice(Real price, Real percentage) // Calculate the discount. Declare Real discount = price * percentage // Subtract the discount from the price. Declare Real discountPrice = price – discount // Return the discount price. Return discount End Functionarrow_forwardNeed help converting my pseudocode to python, AND have a flowchart showing everything!The code: Function getScore() // Prompt the user to enter a test score Display "Enter a test score as a percentage (0-100): " Input score // Return the score entered by the user Return scoreEnd Function Function getGPAPoint(Integer score) // Determine GPA point based on the score If score >= 90 Then Return 4.0 Else If score >= 80 Then Return 3.0 Else If score >= 70 Then Return 2.0 Else If score >= 60 Then Return 1.0 Else Return 0.0 End IfEnd Function Function getAverage() // Initialize variables to store the sum of scores and GPA points totalScore = 0 totalGPA = 0.0 // Loop to collect 5 test scores For i = 1 to 5 Do score = getScore() // Call getScore function to get a test score totalScore = totalScore + score // Add score to totalScore gpaPoint = getGPAPoint(score) // Convert…arrow_forwardWhere did I make an error in my pseudocode module???Code:Module main() Call raiseToPower(2, 1.5) End main Module raiseToPower(Real value, Integer power) Declare Real result Set result = value ^ power Display result End raiseToPowerarrow_forward
- I need help writing pseudocode for calculating class score average by putting in 5 test scores, and showing the average from all 5 inputs and the GPA score.Starting with 3 functions outside of a main module. The functions are getScore(), getGPAPoint(Integer score), and getAverage(). Function getscore is an input for a grade as a class percentage. Function getGPAPoint will calculate the score into a GPA point and return as a float (values of 90-100 as 4.0, 80-89 as 3.0, 70-79 as 2.0, 60-69 as 1.0, and anything below 60 as 0.) Function averageGPA will finally make a call to both previous functions when the user inputs numbers 5 times that then calculates the average (add up all the scores, divide by 5) and the average grade alongside displaying the average GPA. End result is a main module that makes a proper call to the averageGPA function and display its results. Need help with this!arrow_forwardPlease original work Why is integration between data collection and business analysis so important to success in an organization that uses business analytics? How can a company that is just starting to use business analytics set up its program for success right from the beginning? Please cite in text references and add weblinksarrow_forwardHow to make a 1 bit adder with CLA?arrow_forward
- I need help writing pseudocode for this function. The following pseudocode statement calls a function named half, which returns a value that is half that of the argument. (Assume both the result and number variables are Real.) Set result = half(number)arrow_forwardNeed help converting my pseudocode to python, AND have a flowchart showing everything!The code:Main Module Call InputModuleEnd Main Module Module InputModule // This module gets input from the user Declare Principal, AnnualRate, Years as Float Output "Enter the Principal amount (P): " Input Principal Output "Enter the Annual Interest Rate (in percentage, e.g., 5 for 5%): " Input AnnualRate Output "Enter the number of Years to repay the loan: " Input Years Call DisplayPayment(Principal, AnnualRate, Years)End Module Module DisplayPayment(Principal, AnnualRate, Years) // This module calculates and displays the monthly payment Declare R, N as Float Declare MonthlyPayment as Float Declare PowerFactor as Float // second local variable // Calculate monthly interest rate R and number of months N Set R = (AnnualRate / 100) / 12 Set N = Years * 12 // Calculate PowerFactor = (1 + R)^N Set PowerFactor = (1 + R) ^ N // Calculate…arrow_forwardWhats wrong with my pseudocode? Where did I make an error?Code: Module main() Declare Real mileage Call getMileage() Display “You’ve drive a total of “, mileage, “ miles End Module Module getMilage() Display “Enter your mileage: “ Input mileage End Modulearrow_forward
- I need help!! Writing a long pseudocode for a modular program that will display the monthly payment on a mortgage. P=Principal amount borrowed (loan)R=Rate of interest computed for each monthN=Number of months to pay back the loan or mortgageThe help I need is creating a module that you can input the principle, rate of percentage, and years to repay the loan, and another module "displaypayment" that accepts the 3 values and calculates the monthly payment needed for the rates. Lastly 2 local variables needed!Equation:Monthly Payment=[(R*(1+R)^N)/((1+R)^N-1)]*Parrow_forwardTwo pseudocode questions I need help with: How do I design a module called findSum that will display the sum of two integer passed by parameter, and a module called findArea that will display the area of a rectangle when passed 2 real values for the length and width of the rectangle?arrow_forwardFor the pseudocode module, what is displayed with the call findValue(1, 4, 2)?Module findValue(Integer a, Integer b, Integer c) Declare Integer value value = b + c - a Display valuearrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License