Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ Memory addresses?

Tags:

c++

memory

How do memory addresses work?

In 32-bit a memory address is an hexadecimal value like 0x0F032010, right? But do those values point to bytes or to bits?

And what lies between two memory addresses like 0x0F032010 and 0x0F032011

like image 345
Tiago Costa Avatar asked Jan 21 '26 01:01

Tiago Costa


1 Answers

In 32-bit a memory address is an hexadecimal value like 0x0F032010, right?

Its a number. A location in memory. It is bounded by the start and end of memory, which is starting at some value and ending at some value.

But do those values point to bytes or to bits?

It is generally accepted that addresses point to the smallest addressable unit, which is a byte. Most modern CPUs are defined this way. This is however not always the case.

And what lies between two memory addresses like 0x0F032010 and 0x0F032011

Dragons. Or nothing, as there isn't anything between them.

like image 98
Yann Ramin Avatar answered Jan 23 '26 16:01

Yann Ramin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!