Let 4a3a2aao be a 5-bit binary number. a) Write an expression in Boolean algebra that evaluates...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Let а4a3a2a₁ao be a 5-bit binary number. a) Write an expression in Boolean algebra that evaluates to 1 when an odd number of bits of the number is "one" and 0 otherwise. Submit a file named p5a.py. Examples: 01101 evaluates to 1 but 00110 evaluates to 0. b) Write an expression in Boolean algebra that evaluates to 1 when the number is an odd number and 0 otherwise. Submit a file named p5b.py. Examples: 11100 evaluates to 0 but 10111 evaluates to 1. c) Write an expression in Boolean algebra that evaluates to 1 when the number is a non-zero number and 0 otherwise. Submit a file named p5c.py. Examples: 11110 evaluates to 1 and 00001 evaluates to 1 but 00000 evaluates to 0. d) Write an expression in Boolean algebra that evaluates to 1 when either an odd number of bits of the number is "one" or the number is a non-zero odd number but not both, and 0 otherwise. Submit a file named p5d.py. Examples: 00001 evaluates to 0 and 10010 evaluates to 0 but 00010 evaluates to 1 and 11011 evaluates to 1. Let а4a3a2a₁ao be a 5-bit binary number. a) Write an expression in Boolean algebra that evaluates to 1 when an odd number of bits of the number is "one" and 0 otherwise. Submit a file named p5a.py. Examples: 01101 evaluates to 1 but 00110 evaluates to 0. b) Write an expression in Boolean algebra that evaluates to 1 when the number is an odd number and 0 otherwise. Submit a file named p5b.py. Examples: 11100 evaluates to 0 but 10111 evaluates to 1. c) Write an expression in Boolean algebra that evaluates to 1 when the number is a non-zero number and 0 otherwise. Submit a file named p5c.py. Examples: 11110 evaluates to 1 and 00001 evaluates to 1 but 00000 evaluates to 0. d) Write an expression in Boolean algebra that evaluates to 1 when either an odd number of bits of the number is "one" or the number is a non-zero odd number but not both, and 0 otherwise. Submit a file named p5d.py. Examples: 00001 evaluates to 0 and 10010 evaluates to 0 but 00010 evaluates to 1 and 11011 evaluates to 1.
Expert Answer:
Related Book For
Fundamentals Of Digital Logic With Verilog Design
ISBN: 9780073380544
3rd Edition
Authors: Stephen Brown, Zvonko Vranesic
Posted Date:
Students also viewed these programming questions
-
The following graph is given. Using Dijkstra's algorithm determine shortest distance from vertex S to all the other vertices. Clearly fill stack of each vertices S 8 A 8 B D G 7 C F 2 T 10
-
In calculus it is frequently important to write an expression in the form cxn, where c is a constant and n is a rational number. Write each expression in this form. 1. -2 / 3 3(x2 2. -2 (3 4(3x 3. 3x...
-
On February 1, 2020, Sheridan Company sells merchandise on account to Carla Vista Company for $6490. The entry to record this transaction by Sheridan Company is Sales Revenue Accounts Payable Notes...
-
Stocks offer an expected rate of return of 10% with a standard deviation of 20%, and gold offers an expected return of 5% with a standard deviation of 25%. a. In light of the apparent inferiority of...
-
Each fall the Draperton Parks and Recreation Department holds a series of tryouts for its boys' and girls' youth basketball leagues. All leagues are formed by age group, each usually encompassing a...
-
What are the primary categories of a risk?
-
A graphical approach was used to solve the following LP model in Problem 2-15: Maximize profit = $4X + $3T Subject to the constraints 3XY 27 X, Y >0
-
Use the diagram to answer each question. Pulleys 2 5 3 A B have the C D EPotential Energy V 0.425 23. Which machine(s) Do(es) Not multiply the input force? 3 pts UCS
-
On the geologic map in Fig. G-1 (Appendix G) draw the correct strike and dip symbol in each circle to indicate the attitude of Formation B and each dike. To verify your attitude symbols, Fig. G-2 can...
-
Given below are two quantities named A and B. Based on the given information, you have to determine the relation between the two quantities. You should use the given data and your knowledge of...
-
Discuss the traditional family structure and then the nontraditional family structure. How do todays nontraditional families influence sports participation? Is this for the better or the worse?
-
Explain how reference groups play a role in sports participation.
-
Define social class and explain the characteristics of individuals at each level of the seven- tiered structure.
-
Define culture and explain the process of sports socialization. Describe the core American values.
-
Ask three males and three females about the benefits they seek when participating in sports. What conclusions can you draw regarding motivation? Are there large gender differences in the benefits...
-
Lenard Company purchases a delivery truck on April 1, 2011, at a cash price of (SR 22,000). Related expenditures consist of sales taxes (SR 1,320), painting and lettering (SR 500), motor vehicle...
-
For each of the following reactions, express the equilibrium constant: a) H20 (I) H2 (g) + 02 (g) Ke = 1.0x107 b) Fe2 (g) 2F (g) Ke= 4.9 x 10-21 c) C (s) + O2 (g) d) H2 (g) + C2H4 (g) C2H6 (g) Ke =...
-
Perform the following operations involving eight-bit 2s complement numbers and indicate whether arithmetic overflow occurs. Check your answers by converting to decimal signand- magnitude...
-
Use algebraic manipulation to derive the simplest sum-of-products expression for the function f (x 1 , x 2 , x 3 , x 4 , x 5 ) = x 1 x 3 x 5 + x 1 x 3 x 4 + x 1 x 4 x 5 + x 1 x 2 x 3 x 5 .
-
Write Verilog code in the style shown in Figure 5.51 that represents a ring counter. Your code should have a parameter n that sets the number of flip-flops in the counter. module shiftn (R, L, w,...
-
A phenotypically abnormal individual has a phenotypically normal father with an inversion on one copy of chromosome 7 and a phenotypically normal mother without any changes in chromosome structure....
-
Explain why inversions and reciprocal translocations do not usually cause a phenotypic effect. Then explain how they can do so in certain cases.
-
A triploid plant has 18 chromosomes (i.e., 6 chromosomes per set). If we assume that a gamete has an equal probability of receiving one or two copies of each of the 6 types of chromosome, what are...
Study smarter with the SolutionInn App