First of, the ‘b’ stands for bit, _while the B stands for _byte. _So MB stands for _megabyte, _and Mb stands for _megabit. _The _Mi, Ki, Gi prefixes are binary prefixes. The  difference between Mb and Mibit is that MB represents 1000² bits, while Mibit represents 1024² bits. Same goes for Kb and Kibit.

So if it says 2MB, then its 2 * 1000² * 8 bits, and when it says 2Mb, then its 2 * 1000² bits.
When it’s 2Mibit, then it’s 2 * 1024² bits, and when it’s 2MiB it’s 2 * 1024² * 8 bits.