For PC RAMs, when a manufacturer say they produce a 4GB memory bank, they are producing a memory bank with 4,294,967,296 bytes (4 GiB). The same applies to CPU cache, i.e. a CPU with 2MB L3 cache means 2,097,152 bytes (2 MiB) of L3 cache.
For hard drives, flash drives (USB drives, SSDs, eMMCs and UFSs) and optical discs (CDs, DVDs and BDs), manufacturers use powers of 103 for B, KB, MB and GB, so a 4GB USB drive has roughly 4,000,000,000 bytes.
According to my observation, Android phone manufaturers use the latter kind of units when advertising RAM. That does not sound reasonable to me because PCs' RAMs aren't advertised that way.
Edit: I am an experienced Android user. I have investigated the kernel and made sure that other components' sharing RAM does not affect my observation.