How to calculate megabytes? [closed] - bit

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm doing an exercise. But I'm confused on how to calculate the megabytes
A “genome” can be represented as a sequence of “bases”, each of which can be encoded as a two-bit value. Assuming that a megabit is 1,000,000 bits, how many megabytes are required to encode a 16 million base genome?

The line about "a megabit is 1,000,000 bits" seems to suggest:
8 bits in a byte
1,000 bytes in a kilobyte
1,000 kilobytes in a megabyte
Therefore:
1,000,000 bytes in a megabyte; or
8,000,000 bits in a megabyte

16mln * 2 bit / MB = 32 MBit / MB = 32 MB / 8MB = 32 / 8 = 4

1 byte = 8 bits. Today, at least.

Related

Set associative cache with 48 bit adress

This question is from an exame my school made a year ago.
I have a N-way set associative cache with 48 bit adresses and the tag 33 bits.
The cache can store 16384 double-type elements, if the adress is multiple of 64.
The question is: How many sets and lines per set exist?
Since the capacity is 16384 double-type and a double has 8 byte, I put the capacity in 16384 * 8 = 131072 byte
I think the 48 bit (6 byte) adress is the dimension of a line.
I saw on a website that the Cache capacity / number of bits in a line = lines number so I put 131072 / 6 = 21845 (approximate).
I can't get further than this, since I don't find the way to get the sets and if I'm right with the number of lines per set, as this is my problem.
Thanks

About cache memory size - Getting the number of blocks out of the size and number words per block

This is an example from the book Computer Organization and Architecture by Stallings
The cache can hold 64 Kbytes
Data are transfered between main memory and the cache in blocks of 4 bytes each. This means that the cache is organized as 16K = 2^14 lines of 4 bytes each *.
The main memory has 16M. That is 2^24 words. So 4M blocks of 4 bytes.
My confusion is in the second point. It is said that each block is of 4 bytes that is 4 words of 8 bits so one block is 32 bits = 2^5. Now I want to get the number of blocks in the cache. For that I divide the size of the cache with the size of one block, that is 2^16(64K)/2^5(4bytes) = 2^11 lines of 4 bytes each but the answer is 2^14. What am I doing wrong? Thanks!
Its 64K Bytes so it will be 2^16 Bytes.
You will have to make it to bits so it will be (2^16 * 2^3 bits) / 2^5 bits = 2^14

2k x 8 ram. Very stuck [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm struggling with a coursework question. I'm stuck. My brain's hurting and I'm going around in circles.
The question is.
(a) Suppose a memory with 4-byte words and a capacity of 2^21-bit is
built using 2k x 8 RAM.
i. How many chips are needed?
My answer / idea here can't be correct.
Found a question that says how many chips to make 32k memory from 2k x 8 RAM? The answer is 16 chips. That makes sense 2 x 16 = 32
However, 2^21 bits?
4-byte words = 32 bits. This must be the number of bits per cell. The width of the memory?
If the entire memory holds 2^21 bits then does that mean that there will be 2^21 / 32 rows? = 65536 rows. I got to this through the thinking that I need 2^21 bits altogether. If there are 32 per row, I need 65536 rows to get to 2^21 (=2097152).
Even though I have got this far, I can't see how it helps me.
How many bits are stored on each 2k x 8 RAM?
ii. How many address lines are needed for the memory?
I have read that
"2k x 8 RAM is referred to as 2k x n memory. There are k address lines and therefore 2k addresses. Each of these addresses contains an n-bit word.
In this instance, 2k = 2048 = 211. You need 11 address lines."
I don't `100% understand the quote. I know that 2 address lines give four addresses. I know 3 address lines give 8 addresses. Do I need to work this out for 65536 rows?
iii. How many of these address lines are connected to the address inputs of the RAM chips?
????
iv. How many of these address lines will be used to select the appropriate RAM chip(s)?
I understand that some address lines are needed to select the chip whilst others are necessary for the cell in the chip. When I know the number of chips, can I work this out?
Many, many thanks for any help you can give me.
(a) Suppose a memory with 4-byte words and a capacity of 2^21-bit is built using 2k x 8 RAM.
"8 Ram" implies this RAM chip stores bytes, and thus this chip has the capacity to store 2kB, or 512 words == 2^9 words.
Now, to store 2²¹ bits == 2^18 bytes == 2^16 words == 2^7 chips worth of words == 128 chips.
That wasn't so hard, was it?
How many bits are stored on each 2k x 8 RAM?
2k * 8, exactly as your quoted book says.
ii. How many address lines are needed for the memory?
Well, you need 7 lines to select the chip, and 9 lines to select the word inside the chip. 7+9 = 16.
iii. How many of these address lines are connected to the address inputs of the RAM chips?
9, see ii.
iv.
7, see ii.

In the game 2048, what is the biggest theoretical tile? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
In the game 2048 what is the biggest tile that can be achieved, assuming a player playing optimally and tile spawning at the most optimal place?
Naively I would say that the biggest achievable tile is 65536 * 2 = 131072 because it seems that the best possible board is the following:
4 4 8 16
256 128 64 32
512 1024 2048 4096
65536 32768 16384 8192
But I'm not sure if
it's correct
how to prove that my intuition is indeed correct.
(sorry if I should have asked on gaming.stackexchange, but this is more of a CS question than a gaming one afaict)
you haven't finished yet with the board you propose: you can slide to the right, going all the way down and obtaining 131072. So your analysis was correct although you missed a spot:
This will be your final board:
4 8 16 32
512 256 128 64
1024 2048 4096 8192
131072 65536 32768 16384

Populate a memory array of 64K words – each word is 20 bits wide – out of 1K by 4 bit memory chips. How many such chips will you need? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 9 years ago.
I know this doesn't exactly fit the mold of this site, but this is a better place to ask than say Yahoo Answers. Can anyone help me with this?
Suppose you are instructed to populate a memory array of 64K words – where each word is 20 bits wide (let’s assume the extra 4 bits are for error correction) – out of 1K by 4 bit memory chips. How many such chips will you need?
Thanks!
I'll take a guess :-)
24bits/word, 65536 words = 1572864 bits.
1K x 4-bit memory means 4096 bits/chip, is that correct?
Then we have 1572864 bits / 4096 bits/chip = 384 chips.
5x 1Kx4 chips for 1K words, so 5*64 chips in total is 320

Resources