341 and 3640  How many bits are required to store this number?explain How do you find it and show your works.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 4PE
icon
Related questions
Question
100%

341 and 3640  How many bits are required to store this number?explain How do you find it and show your works.

Expert Solution
Step 1

Integers are stored in using the word memory. This word is equal to 4 bytes or 32 bits.

So, the integers from 0 to 232-1 can be stored using these 4 bytes or 32 bits memory.

Example:

Integer 1 is expressed as a 32-bit value

1: 00000001  00000000  00000000   00000000

 

ISSUES:

There are two issues for the above rule,

This does not fit

  • for negative numbers
  • for very large numbers 2^32 or greater. These large valued numbers cannot be stored in 32-bit of memory.

SOLUTION:

1)  In the case of negative numbers, we can clear this issue by sacrificing one bit as the Sign bit to indicate whether it is negative or positive.

  • 1 indicates a negative number
  • 0 indicates a positive number.

Thus, the integers range from -(232-1) to +(232-1).

2)  In the case of very large integers, we need to use more memory to store the large value, such as two words per integer.

NOTE:

A word is represented as a collection of 32-bits or a collection of 4-bytes.

 

Step 2

1) 341

convert 341 to binary value.

Computer Science homework question answer, step 2, image 1

so, 34110  = 1010101012

thus, the number 341 can be represented as a 32-bit value as follows,

10101010  10000000  00000000  00000000

 

ANSWER:

This number 341 can be stored using 32-bits of memory.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning