K
K
kajidooto2017-02-19 14:35:14
Programming
kajidooto, 2017-02-19 14:35:14

Did I understand correctly how RAM is arranged?

Did I understand correctly that:
- all computer memory is 8-bit or 1-byte cells
- a variable in my program, depending on its type or size, can occupy one or more cells
- the computer does not know the size of the variable , because see p #1. that is, whether these are 2 variables of 8 bits or one 16 bit - he does not know because both those and those are still stored in memory in the same way.
-- only we can tell this in our program by explicitly specifying the size of the variable.
Please answer yes or no and don't go deep.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
1
15432, 2017-02-19
@15432

-- Please answer yes or no and don't go deep.
as you wish
1) no
2) yes
3) yes and no
4) yes

D
d-stream, 2017-02-19
@d-stream

Very simplistic, but in the right direction.

N
nirvimel, 2017-02-19
@nirvimel

Yes. All of the above is true as long as we are talking about x86 (including x86-64).
But for other architectures, the answer may be different.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question