From the course: Symmetric Cryptography Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Integers

Integers

From the course: Symmetric Cryptography Essential Training

Start my 1-month free trial

Integers

- [Instructor] Integers are whole numbers and are often stored in one, two, four, or eight bytes. I've written a short program for you to play with that demonstrates how integers are represented in memory. This is important to know because they're not always represented the same across different computers. Before we get to the program though, let's talk about the differences between the ways integers are represented. The first option is Big Endian. Big Endian means that the most significant bits are first in memory. The other option is Little Endian which means that the least significant bits are the first in memory. Little Endian is how integers are represented on most current Intel and AMD processors. So as an example, if we have a 32-bit integer, so four bytes, storing the value one, that looks different in Big Endian and Little Endian. With Big Endian, the one ends up in the last byte as you see here. But with Little Endian, it ends up in the first byte. Frankly, aside from our…

Contents