You have probably already noticed that when you plug a storage device (USB drive, memory card, hard drive, etc.) into your computer, you do not get its exact advertised capacity.
For a 4 GB USB drive, you may see 3.8 GB. For a 1 TB hard drive, you may see 0.91 TB.
Many explanations are given for this, including some of the worst I have heard: the storage device reserves that space for itself, the USB drive needs room to breathe… Seriously?

The real explanation is this: 1 GB = 1000 MB for some, and 1 GB = 1024 MB for others.
How is that possible?
Every action you perform with your phone or computer is transformed by the system into a sequence of 0s and 1s so it can be processed. That is where the famous phrase comes from: a computer only understands 0s and 1s.
Did I lose you?
To put it simply, the voice note you send, the photo you want to use as a profile picture, and many other things are represented as 0s and 1s.
To make things easier, computer engineers chose:
1 GB = 1024 MB, 1 MB = 1024 KB, and so on. These are powers of 2 (two possible states: either 1 or 0): 1024 = 2 ^ 10.
On the other hand, the International Bureau of Weights and Measures, the organization behind units such as kilometer, kilogram, centiliter, nanometer, and others, clearly states that kilo means 1000 of a unit (10 to the power of 3). This means 1 KB should equal 1000 bytes.
Storage manufacturers (hard drives, USB drives, memory cards) follow the International Bureau of Weights and Measures standard: 1 TB = 1000 GB, 1 GB = 1000 MB, 1 MB = 1000 KB, and so on. This also allows them to spend less on manufacturing.
Here is the most important paragraph (yes, you could have skipped everything else):
When your storage device is manufactured (your phone memory, USB drive), 1 KB = 1000 bytes, 1 MB = 1000 KB, 1 GB = 1000 MB, and so on.
When the operating system (Android, Windows) is designed, by default, 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, and so on.
So for an 8 GB USB drive (8,000 MB according to the manufacturer), you will see about 7.8 GB displayed (8,000 divided by 1024 by the software).
It is worth noting that a unit was proposed for values based on 1024. It uses binary prefixes: kibibyte, mebibyte, gibibyte, and so on. 1 GiB = 1024 MiB, 1 KiB = 1024 bytes. But these names are rarely used in everyday language.
The English word for octet is byte. So 1 gigaoctet equals 1 gigabyte.
Now you know how to answer the question: how many megabytes are in 1 gigabyte?