Ultimately, computer data is just patterns of high and low electrical charges. Each high/low charge is called “a bit”.
We can technically call a number a “data structure”. It means we pick a number of bits and say that certain patterns mean certain numbers.
A more complicated data structure can refer to multiple things. Say we want to represent a list of 10 numbers. If each number is 8 bits, we could just point at 80 bits and say “that’s 10 numbers”.
But what if we want different sizes of lists? Well, then we might say “The first 8 bits represent how many numbers there are”. So the list of 10 numbers now takes 88 bits: the first 8 bits will be in the pattern for “10”, then we know the next 80 bits represent 10 numbers.
We can get even more complicated. Maybe we want a list of numbers, but the numbers aren’t all in a neat little line in memory. Well, we can store a *memory address* in a list. That way we still have a list that represents a number of things, but now those things can be scattered throughout memory.
So a data structure is really just a way for us to organize memory and dictate rules about what the values represent. But it’s not very useful to describe them to people who aren’t familiar with programs, because we don’t tend to use complex data structures unless we’re solving relatively complex problems.
Latest Answers