1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
charle [14.2K]
4 years ago
13

Create a truth table of the function PRIME(A,B,C,D) where A,B,C,D are the bits of a 4-bit number. A is the highest significant b

it and D is the least significant.
Mathematics
1 answer:
Serga [27]4 years ago
5 0

Answer:

The output is 1 for:

1_{10} = (0001)_{2}

2_{10} = (0010)_{2}

3_{10} = (0011)_{2}

5_{10} = (0101)_{2}

7_{10} = (0111)_{2}

11_{10} = (1011)_{2}

13_{10} = (1101)_{2}

Step-by-step explanation:

The first step is creating the truth table, from the most significant bit to the least significant. Then, each value is converted to decimal, like these two examples:

(1111)_{2} = 1*2^{0} + 1*2^{1} + 1*2^{2} + 1*2^{3} = 15

(1110)_{2} = 0*2^{0} + 1*2^{1} + 1*2^{2} + 1*2^{3} = 14

After the conversion, if the decimal equivalent of the 4-bit number is prime, the output is 1.

So, the output is 1 for 1,2,3,5,7,11,13

So

A - B - C - D - Decimal - Output

0 - 0 - 0 - 0 -       0       -    0

0 - 0 - 0 - 1  -        1       -     1

0 - 0 - 1 - 0 -         2      -     1

0 - 0 - 1 - 1 -          3      -     1

0 - 1 - 0 - 0 -         4      -    0

0 - 1 - 0 - 1 -          5      -     1

0 - 1 - 1 - 0 -          6      -    0

0 - 1 - 1 - 1  -          7      -     1

1 - 0 - 0 - 0 -         8     -      0

1 - 0 - 0 - 1 -          9     -      0

1 - 0 - 1 - 0 -          10    -      0

1 - 0 - 1 - 1  -          11     -      1

1 - 1 - 0 - 0 -          12    -      0

1 - 1 - 0 - 1 -           13    -       1

1 - 1 - 1 - 0 -           14   -        0

1 - 1 - 1 - 1 -            15   -        0

You might be interested in
Dose someone know this
nataly862011 [7]
What is there to answer...
5 0
3 years ago
Emily simplified this expression.
AleksandrR [38]
In number 2............
5 0
3 years ago
Match the two numbers with their least common multiple (LCM).8 and 4 8 and 6 8 and 10
Alona [7]
If you want just the LCM it’s 2
8 0
3 years ago
Can someone teach me how to divide?? :((
Anni [7]
It's easy just do the long way version do you know what way?
7 0
3 years ago
PLS HELP :( WILL GIVE BRAINLIEST+ 25 POINTS
babunello [35]

Answer:

The answer is A i just took the test and made a 100

Step-by-step explanation:

6 0
4 years ago
Other questions:
  • K = (°F + 460) ÷ 1.8 Find the temperature in Kelvin, on a balmy Autumn day, where the thermometer reads 56 Farenheit. A) 286.67
    9·1 answer
  • Solving equations with one variable
    15·1 answer
  • In which of your school subjects do you use manipulation of numbers?
    5·1 answer
  • 10b - 2 = 7b - 7.4 NEED ASAP!!!!!!!
    10·2 answers
  • Find two numbers with a sum of 20 and a difference of 14.
    10·1 answer
  • Given a rectangle with a side of 10m and a dialogue of 26m. Find the perimeter of the rectangle.
    14·2 answers
  • USA test prep question:What is 2 2/3 ÷ 2/3
    5·1 answer
  • Is - 9.813 irrational
    10·1 answer
  • A car can travel 192 miles on 6 gallons of gas. How many miles can the car travel on 15 gallons of gas?
    7·1 answer
  • The winner of a raffle will receive three-fourths, or 0.75, of the $530.40 raised from raffle ticket sales.
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!