(Numerical Data Representation) How many bits per word are required to represent the following positive decimal integers: a.0 through 100b.0 through 255c.0 through 256d.0 through 10,000,000

Answers

Answer 1
Answer:

Answer:

a. 7 bits

b. 8 bits

c. 9 bits

d. 24 bits

Explanation:

Required

Number of bits per word

The formula to get the number of bits per word is:

2^n = N

Where

n = bits

N = numbers

Solving (a) 0 to 100

There are 101 digits between 0 and 100 (inclusive)

So:

N = 101

Substitute 101 for N in 2^n = N

2^n = 101

101 can not be expressed as an exponent of 2.

So, we substitute 101 for the closest number greater than 101 that can be expressed as an exponent of 2.

So:

2^n = 128

Express 128 as an exponent of 2

2^n = 2^7

Apply law of indices

n = 7

Hence, 7 bits are required

Solving (b): 0 through 255

There are 256 digits between 0 and 255 (inclusive)

So:

N = 256

Substitute 256 for N in 2^n = N

2^n = 256

Express 256 as an exponent of 2

2^n = 2^8

Apply law of indices

n = 8

Hence, 8 bits are required

Solving (c): 0 through 256

There are 257 digits between 0 and 256 (inclusive)

So:

N = 257

Substitute 257 for N in 2^n = N

2^n = 257

257 can not be expressed as an exponent of 2.

So, we substitute 257 for the closest number greater than 101 that can be expressed as an exponent of 2.

So:

2^n = 512

Express 512 as an exponent of 2

2^n = 2^9

Apply law of indices

n = 9

Hence, 9 bits are required

Solving (d): 0 through 10000000

There are 10000001 digits between 0 and 10000000 (inclusive)

So:

N = 10000000

Substitute 10000000 for N in 2^n = N

2^n = 10000000

10000000 can not be expressed as an exponent of 2.

So, we substitute 10000000 for the closest number greater than 101 that can be expressed as an exponent of 2.

So:

2^n = 16777216

Express 16777216  as an exponent of 2

2^n = 2^{24

Apply law of indices

n = 24

Hence, 24 bits are required


Related Questions

/ Looks up author of selected booksimport java.util.*;class DebugNine1{public static void main(String[] args){Scanner input = new Scanner(System.in);String[][] books = new String[6][2];books[0][0] = "Ulysses";books[0][1] = "James Joyce";books[1][0] = "Lolita"books[1][1] = "Vladimir Nabokov";books[2][1] = "Huckleberry Finn";books[2][1] = "Mark Twain";books[3][0] = "Great Gatsby";books[3][2] = "F. Scott Fitzgerald";books[4][0] = "1984";books[4][1] = "George Orwell";books[5][5] = "Sound and the Fury";books[5][1] = "William Faulkner";String entry,shortEntry,message ="Enter the first three characters of a book title omitting \"A\" or \"The\" ";int num, x;boolean isFound = true;while(!isFound){System.out.println(message);entry = input.next();shortEntry = entry.substring(0,3);for(x = 0; x < books.length; ++x)if(books[x][0].startsWith(shortEntry)){isFound = true;System.out.println(books[x][x] + " was written by " + books[x][1]);x = books.length;}if(isFound)System.out.println("Sorry - no such book in our database);}}}
Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching configuration and decides to copy the bootmgr file from the working computer to the computer with the problem. However, your friend is having problems finding the bootmgr file and asks for your help. What is your best response?
What type of result does the MATCH function, when used on its own, return?
The scope of a variable declared inside of a function is:a) Local - within that functionb) Within that file onlyc) global
Which statement is written correctly?

This assignment deals with Logical Equivalences. Review section 1.7 of the text before completing the assignment. The assignment may be handed in twice before it is graded. Consider the statements in the left column of the tables below. Translate each into a propositional statement. In the box below, indicate which two statements are logically equivalent. The gray shaded box is the Equation editor that should be used to enter the propositional expression.Question 1
Statement Reason
Whenever there is a puppy in the house, I feel happy
If I am happy, then there is a puppy in the house
If there is not a puppy in the house, then I am not happy.
If I am not happy, then there is no puppy in the house
Question 2
Statement Reason
If I am in school today, then I am in CSC231 class
If I am not in school today, then I am not civics class
If I am not in CSC231 class, then I am not in school today
If I am in CSC231 class, then I am in school today

Answers

Answer:

Question (1) the statements (i) and( iv) are logically equivalent and statements (ii) and (iii) are logically equivalent. Question (2) the statements (i) and (iii) are logically equivalent.

Explanation:

Solution

Question (1)

Now,

Lets us p as puppy in the house, and q as i am happy

So,

p : puppy in the house,  and q : i am happy

Thus,

The Statements

(i) so if there is a puppy in the house, I feel happy :  p -> q

(ii) If I am happy, then there is a puppy in the house : q -> p

(iii) If there is no puppy in the house, then I am not happy.   : ~ p -> ~q

(iv) If I am not happy, then there is no puppy in the house : ~q -> ~p

Hence, the statements (i) and( iv) are logically equivalent and statements (ii) and (iii) are logically equivalent.

Question (2)

Let us denote p as i am in school today, and q as i am in CSC231 class, and r as i am in civics class,

So,

p: i am in school today, q: i am in CSC231 class, r: i am in civics class,

Now,

(i) if I am in school today, then I am in CSC231 class  :p -> q

(ii) If I am not in school today, then I am not civics class  :~p -> ~r

(iii) If I am not in CSC231 class, then I am not in school today  :~q -> ~p

(iv) If I am in CSC231 class, then I am in school today  : q -> p

Therefore, the statements i) and iii) are logically equivalent.

What is a digital projector? How is it different from computer screen?

Answers

Answer:

An LCD projector is a type of video projector for displaying video, images, or computer data on a screen or other flat surface. It is a modern equivalent of the slide projector or overhead projector.

It's different because in a computer display, the screen is the physical surface on which visual information is presented. This surface is usually made of glass.

Explanation:

A digital projector is a device that projects video or images onto a large screen, suitable for shared viewing in larger settings. It differs from a computer screen in terms of size, portability, shared viewing capabilities, image quality, source connectivity, and adjustments.

A digital projector is a device that takes a video or image signal from a computer, DVD player, or other multimedia source and projects it onto a large screen or surface.

The key differences between a digital projector and a computer screen:

Size: The most obvious difference is the size of the display.

Portability: Computer screens are generally fixed and not easily portable, whereas digital projectors are often designed for mobility.

Shared Viewing: A computer screen is designed for individual or small group viewing at close distances, while a digital projector is meant for larger audiences.

Image Quality: Digital projectors vary in imagequality, and high-quality projectors can offer impressive resolution and brightness suitable for movie screenings or professional presentations.

Source Connectivity: Both a computer screen and a digital projector can receive input from computers and other multimedia sources.

Placement and Adjustment: Digital projectors often provide manual or automatic keystone correction and focus adjustments to ensure the projected image remains proportional and clear on the screen or surface.

Hence,  a digital projector is a device used to project large-scale images or video onto a screen or surface, suitable for shared viewing in larger settings.

To learn more on Digital projector click here:

brainly.com/question/19486217

#SPJ3

Susan is taking a French class in college and has been asked to create a publication for her class. What feature can sheuse to help her develop her publication in French?
Research
Grammar
Language
Spell Check

Answers

the answer is Language

Answer:

Essayons

Explanation:

Make a program that asks for input from the user, apply eval to this input, and print out the type of the resulting object and its value. Test the program by providing five types of input: an integer, a real number, a complex number, a list, and a tuple.

Answers

Answer:

x = input("Input a number ")

print(eval("x"))

print ("Type is:",type(x))

#Taking an float input

y = input("Input a number ")

print(eval("y"))

print ("Type is:",type(y))

#Taking an complex input

z = complex(input("Input a number "))

print(eval("z"))

print ("Type is:",type(z))

#Taking an List input

L_num = raw_input().split(",")

print(eval("L_num"))

print ("Type is:",type(L_num))

#Taking an tuple input.

T_num = raw_input().split(",")

print(eval("T_num"))

print ("Type is:",type(T_num))

Explanation:

A mobile device user is having problems launching apps and texting. The user touches an app to launch it, but the app icon next to the desired app launches instead. When the user types a text message, every word in the message is misspelled. What is the most likely cause for this behavior?

Answers

Answer:

The screen protector may be interfering with the touch response

Explanation:

Screen protectors or commonly called screen guards are used to protect phone screens. In case they fall to the ground, these protectors act as shields to keep the phone screen from getting damaged. However screen protectors if not positioned or fixed properly may also cause hindrance to effective touch response as they become barriers to the touch screen.

On a roulette wheel, the pockets are numbered from 0 to 36. The colors of the pockets are as follows: Pocket 0 is green. For pockets 1 through 10, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 11 through 18, the odd-numbered pockets are black and the even-numbered pockets are red. For pockets 19 through 28, the odd-numbered pockets are red and the even-numbered pockets are black. For pockets 29 through 36, the odd-numbered pockets are black and the even-numbered pockets are red. Write a program that asks the user to enter a pocket number and displays whether the pocket is green, red, or black. The program should display an error message if the user enters a number that is outside the range of 0 through 36.

Answers

Answer:

pkt = int(input("Pocket Number: "))

if pkt == 0:

   print("Green")

elif pkt >= 1 and pkt <=10:

   if pkt%2 == 0:

       print("Black")

   else:

       print("Red")

elif pkt >= 11 and pkt <=18:

   if pkt%2 == 0:

       print("Red")

   else:

       print("Black")

elif pkt >= 19 and pkt <=28:

   if pkt%2 == 0:

       print("Black")

   else:

       print("Red")

elif pkt >= 29 and pkt <=36:

   if pkt%2 == 0:

       print("Red")

   else:

       print("Black")

else:

   print("Error")

Explanation:

The program was written in Python and the line by line explanation is as follows;

This prompts user for pocket number

pkt = int(input("Pocket Number: "))

This prints green if the pocket number is 0

if pkt == 0:

   print("Green")

If pocket number is between 1 and 10 (inclusive)

elif pkt >= 1 and pkt <=10:

This prints black if packet number is even

   if pkt%2 == 0:

       print("Black")

Prints red, if otherwise

   else:

       print("Red")

If pocket number is between 11 and 18 (inclusive)

elif pkt >= 11 and pkt <=18:

This prints red if packet number is even

   if pkt%2 == 0:

       print("Red")

Prints black, if otherwise

   else:

       print("Black")

If pocket number is between 19 and 28 (inclusive)

elif pkt >= 19 and pkt <=28:

This prints black if packet number is even

   if pkt%2 == 0:

       print("Black")

Prints red, if otherwise

   else:

       print("Red")

If pocket number is between 29 and 36 (inclusive)

elif pkt >= 29 and pkt <=36:

This prints red if packet number is even

   if pkt%2 == 0:

       print("Red")

Prints black, if otherwise

   else:

       print("Black")

Prints error if input is out of range

else:

   print("Error")