Question
IN JAVA PLEASE!! Per the in-class discussion and format of truth tables described in Levin's DMOI, write a program to show the Boolean function of
IN JAVA PLEASE!!
Per the in-class discussion and format of truth tables described in Levin's DMOI, write a program to show the Boolean function of variable degrees n and weights w. Follow the sample session below. All your code should be contained in _one_ file for compilation and submission.
n: # of logic symbols in the truth table
w: per the definition on page 72 of DMOI
You can assume: 2 =< n <= 10.
== sample session
Degree n and minimum weight w?
2 2 <--- two positive integers separated by a space
Function f? <--- for n=2, f has a range of 0 to 15; make sure it starts from 0
0 <--- user input; will provide a + int; must check range validity
f0: 0011 <--- program output; the 0th function output that satisfies the weight req
Function f?
6 <--- asking for the 6th function output in Boolean bit pattern
f6: 1011 <--- the output of the 6th function that satisfies the weight req
Function f?
28 <---- does not satisfy range and weight req
Bye <---- exit when f is invalid
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started