Today’s Wonder of the Day was inspired by Nadya from Forked River, NJ. Nadya Wonders, “How does a website remember all of the usernames and passwords?” Thanks for WONDERing with us, Nadya!
Do you have a favorite website you like to visit on a regular basis? Of course you do! It's Wonderopolis! But we actually meant a favorite site other than Wonderopolis…
Some people like to watch funny cat videos while others might prefer to do some online shopping. Sports fans might visit the sites of their favorite teams to relive past days of glory. Music fans might check out their favorite artists online to listen to music and watch videos of concert performances.
If you spend much time on the World Wide Web (that's where that ubiquitous www comes from, by the way), there are a couple of things you're sure to run into over and over again: usernames and passwords. Most people have a wide variety of usernames and passwords they use for various sites they visit frequently.
Creating unique usernames and passwords is an important step in protecting your online identity. You don't want others to guess your username and password. With that information, they could purchase things online using your money. They could also post inappropriate or embarrassing things on social media using your account.
If you have several usernames and passwords for different sites, you've probably already realized how difficult it can be to remember all the different combinations. But what about all those websites? Social media sites, such as Twitter and Facebook, receive millions upon millions of visitors daily. How do these websites remember all those usernames and passwords to verify everyone's online identity?
Fortunately, unlike us humans who have to use our brains to remember things, websites rely upon advanced computers with huge memory capacities to store all those usernames and passwords in databases. Moreover, all those usernames and passwords don't necessarily take up all that much space in the grand scheme of things.
The basic unit of computer memory is the byte, which is equal to a single alphanumeric character. If your username is "wonderfriend" and your password is "w0nd3rfr13nd," then those 24 alphanumeric characters take up 24 bytes of memory.
Some people use shorter usernames and passwords, while others choose longer, more complicated usernames and passwords to bolster Internet security. For the purpose of learning more about memory, though, let's assume that everyone uses a username and password combination that adds up to 24 characters, which would equal 24 bytes of memory.
A byte is actually a tiny unit of memory in today's computing world. Today's computers and hard drives measure memory in much larger quantities. Let's take a look at a few of the most common units.
A kilobyte (kb) equals 1,024 bytes. One kilobyte of memory would thus hold a little over 42 username and password combinations. A megabyte (mb) equals 1,024 kilobytes. Using basic multiplication, we can calculate that one megabyte of memory would hold over 43,000 username and password combinations.
A megabyte still isn't much memory these days, though. Today's computers and devices usually have memory capacities measured in gigabytes (gb) and terabytes (tb). There are 1,024 megabytes in one gigabyte, and there are 1,024 gigabytes in one terabyte.
Continuing our use of basic multiplication, we can calculate that one gigabyte of memory could hold over 44 million username and password combinations. If you have a smartphone with a capacity of 64 gigabytes, it could hold nearly 3 billion username and password combinations.
Since websites are hosted on advanced computers with storage capacities that exponentially exceed those of a smartphone, you can see how easy it is to store a few hundred million usernames and passwords!