The reason Raw files are bigger and take up more memory, is because Raw files have more
bit-depth.
Raw files are 12-bit or 14-bit files as they are written to the memory card, while JPEG is limited to being an 8-bit depth file.
12-bits can represent 4096 colors in each of the 3 RGB color channels, or about
68.7 billion colors (4096 x 4096 x 4096 = 68,719,476,736 colors)
14-bits can represent 16384 colors in each of the 3 RGB color channels, or about
4.4 trillion colors (16,384 x 16,384 x 16,384 = 4,398,046,511,104 colors)
8-bits can only represent 256 colors in each of the 3 RGB color channels, or about
16.7 million colors (256 x 256 x 256 = 16,777,216 colors)
Bit Depth
Tutorials – The RAW File Format
Image Types: JPEG & TIFF File Formats