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
yKpoI14uk [10]
4 years ago
12

5) [4 points] Suppose you have a simple computer that is capable of storing only the months of the year. The number of bits avai

lable to the computer is very limited and can only hold one month at any given time. Invent an encoding scheme in which you assign a unique binary number to each month. A bit is able to store either a zero or a one. What is the minimum number of bits you need to implement your encoding scheme?
Computers and Technology
1 answer:
TEA [102]4 years ago
7 0

Answer:

<h3>A minimum of 4 bits will be needed.</h3><h3 />

Explanation:

As there are 12 months in a year so will need 12 need combinations.

Number of bits can be determined by the powers of 2. By this we mean:

  • <u>If 1 bit is used</u>

                  2^1 = 2   Two unique combinations can be made that are                  0 and 1.

  • <u>If 2 bits are used</u>

                 2^2 = 4   4 unique combinations can be made.

  • <u>If 3 bits are used</u>

                2^3 = 8   8 unique combinations can be made.

  • <u>If 4 bits are used</u>

               2^4 = 16 16 unique combinations can be made.

               

Now we will have to use 4 bits so that 12 unique combinations may be assigned to each month.

<h3>Following is given the bit pattern for each month:</h3><h3 />

JANUARY   => 0000

FEBRUARY  => 0001

MARCH        => 0010

APRIL           => 0011

MAY             => 0100

JUNE            => 0101

JULY             => 0111

AUGUST       => 0110

SEPTEMBER => 1000

OCTOBER    => 1001

NOVEMBER => 1010

DECEMBER  => 1011

<h3>i HOPE IT WILL HELP YOU!</h3>
You might be interested in
Integers and booleans. Write a program RightTriangle that takes three int command-line arguments and determines whether they con
icang [17]

Answer:

<em>The programming language is not stated;</em>

<em>I'll answer using C++</em>

#include<iostream>

#include<cmath>

using namespace std;

int main()

{

int side1, side2, side3;

cout<<"Enter the three sides of the triangle: "<<endl;

cin>>side1>>side2>>side3;

if(side1<=0 || side2 <= 0 || side3 <= 0) {

 cout<<"Invalid Inputs";

}

else {

 if(abs(pow(side1,2) - (pow(side2,2) + pow(side3, 2)))<0.001) {

  cout<<"Right Angled";

 }

 else if(abs(pow(side2,2) - (pow(side1,2) + pow(side3, 2)))<0.001) {

  cout<<"Right Angled";

 }

 else if(abs(pow(side3,2) - (pow(side2,2) + pow(side1, 2)))<0.001) {

  cout<<"Right Angled";

 }

 else {

  cout<<"Not Right Angled";

 }

}

return 0;

}

Explanation:

The following line declares the three variables

int side1, side2, side3;

The next line prompts user for input of the three sides

cout<<"Enter the three sides of the triangle: "<<endl;

The next line gets user input

cin>>side1>>side2>>side3;

The following if condition checks if any of user input is negative or 0

<em> if(side1<=0 || side2 <= 0 || side3 <= 0) { </em>

<em>  cout<<"Invalid Inputs"; </em>

<em> } </em>

If otherwise

else {

The following if condition assumes that side1 is the largest and test using Pythagoras Theorem

<em>if(abs(pow(side1,2) - (pow(side2,2) + pow(side3, 2)))<0.001) { </em>

<em>   cout<<"Right Angled"; </em>

<em>  } </em>

The following if condition assumes that side2 is the largest and test using Pythagoras Theorem

<em>  else if(abs(pow(side2,2) - (pow(side1,2) + pow(side3, 2)))<0.001) { </em>

<em>   cout<<"Right Angled"; </em>

<em>  } </em>

The following if condition assumes that side3 is the largest and test using Pythagoras Theorem

<em>  else if(abs(pow(side3,2) - (pow(side2,2) + pow(side1, 2)))<0.001) { </em>

<em>   cout<<"Right Angled"; </em>

<em>  } </em>

If none of the above conditions is true, then the triangle is not a right angles triangle

<em>  else { </em>

<em>   cout<<"Not Right Angled"; </em>

<em>  } </em>

}

return 0;

Download cpp
4 0
4 years ago
The odometer gauge indicates the ________________.
kkurt [141]
<span>The odometer gauge indicates the total number of miles that a car has been driven, so the correct answer here is a. This is normally a sealed system, so that when a vehicle is sold from one party to another, the mileage driven figure can be trusted.</span>
7 0
4 years ago
Read 2 more answers
Megan was employed by a large company. Her supervisor told her to falsify government reports. She refused and was fired. She sue
Ber [7]

Answer: Option(d) is correct option

Explanation:

At-will employment is the employment in contractual manner in which employer can fire employee without any warning or indication .They can fire employee for any cause .

  • According to the question, even though Megan was hired at at-will employment base ,she does not persist much right over the company but she should not be dismissed for not performing illegal act as the reason for getting fired.This is a unfair and illegal manner of firing.
  • Other options are incorrect because employer was not correct on firing her because of loyalty duty or based on legal right or with just reason.Thus, the correct option is option(d)
7 0
4 years ago
Which one is exit controllefd loop ?<br>1.while loop <br>2. for loop<br>3. do loop<br>4. none <br>​
erica [24]

Answer:

2 is the ans

Explanation:

bye bye, gonna go to studyy

3 0
3 years ago
A backup of sewage in the operations storeroom would be a reason to contact the local regulatory authority because it is conside
CaHeK987 [17]
65, for sure, the number at the end of the rectangle is the q3
6 0
4 years ago
Read 2 more answers
Other questions:
  • What is difference between actual parameters and formal parameters in java?​
    8·2 answers
  • Which option will enable Mina to apply several formats to the spreadsheet cells at the same time? A. cell content B. cell patter
    13·1 answer
  • Which of the following is NOT a Boolean Search term used to refine search engine results? A. AND B. With C. OR D. NOT
    14·2 answers
  • Create a Trip class. Include as data members destination, distance traveled, total cost of gasoline, and number of gallons consu
    14·1 answer
  • Write a VB program to convert a temperature from Celsius to Fahrenheit and vice versa.
    15·1 answer
  • What is the correct syntax to take the first five characters from the cell A2 and place it to its right in cell A3? =RIGHT(A3,5)
    5·2 answers
  • Critical thinking questions Giving 30 points if you answer correctly!!!!
    7·1 answer
  • What is VLSI stand for​
    14·1 answer
  • Say yes if you hate edge2021?
    8·2 answers
  • You are investigating a problem between two wireless bridges and you find that signal strength is lower than expected. Which of
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!