Random Things

Posts on anything and everything

Labels

Airlines Amazon Auto Electronics Entertainment Faith FB Finance Fix Things Food Gaming Geography Google HaHa's Health Information Mac Microsoft Military Movies Music News Personal Photography Politics Recalls Reviews Riddle Science Security SM Space Sports Tech Terms Thoughts Tools Travel Trivia Videos VR World News

Thursday, October 11, 2018

What is Binary?


What is Binary, and Why Do Computers Use It?

ANTHONY HEDDINGS 






Computers don’t understand words or numbers the way humans do. Modern software allows the end user to ignore this, but at the lowest levels of your computer, everything is represented by a binary electrical signal that registers in one of two states: on or off. To make sense of complicated data, your computer has to encode it in binary.
Binary is a base 2 number system. Base 2 means there are only two digits—1 and 0—which correspond to the on and off states your computer can understand. You’re probably familiar with base 10—the decimal system. Decimal makes use of ten digits that range from 0 to 9, and then wraps around to form two-digit numbers, with each digit being worth ten times more than the last (1, 10, 100, etc.). Binary is similar, with each digit being worth two times more than the last.

Counting in Binary

In binary, the first digit is worth 1 in decimal. The second digit is worth 2, the third worth 4, the fourth worth 8, and so on—doubling each time. Adding these all up gives you the number in decimal. So,
1111 (in binary)  =  8 + 4 + 2 + 1  =  15 (in decimal)
Accounting for 0, this gives us 16 possible values for four binary bits. Move to 8 bits, and you have 256 possible values. This takes up a lot more space to represent, as four digits in decimal give us 10,000 possible values. It may seem like we’re going through all this trouble of reinventing our counting system just to make it clunkier, but computers understand binary much better than they understand decimal. Sure, binary takes up more space, but we’re held back by the hardware. And for some things, like logic processing, binary is better than decimal.
There’s another base system that’s also used in programming: hexadecimal. Although computers don’t run on hexadecimal, programmers use it to represent binary addresses in a human-readable format when writing code. This is because two digits of hexadecimal can represent a whole byte, eight digits in binary. Hexadecimal uses 0-9 like decimal, and also the letters A through F to represent the additional six digits.

So Why Do Computers Use Binary?

The short answer: hardware and the laws of physics. Every number in your computer is an electrical signal, and in the early days of computing, electrical signals were much harder to measure and control very precisely. It made more sense to only distinguish between an “on” state—represented by negative charge—and an “off” state—represented by a positive charge. For those unsure of why the “off” is represented by a positive charge, it’s because electrons have a negative charge—more electrons mean more current with a negative charge.
So, the early room-sized computers used binary to build their systems, and even though they used much older, bulkier hardware, we’ve kept the same fundamental principles. Modern computers use what’s known as a transistor to perform calculations with binary. Here’s a diagram of what a field-effect transistor (FET) looks like:
Essentially, it only allows current to flow from the source to the drain if there is a current in the gate. This forms a binary switch. Manufacturers can build these transistors incredibly small—all the way down to 5 nanometers, or about the size of two strands of DNA. This is how modern CPUs operate, and even they can suffer from problems differentiating between on and off states (though that’s mostly due to their unreal molecular size, being subject to the weirdness of quantum mechanics).

But Why Only Base 2?

So you may be thinking, “why only 0 and 1? Couldn’t you just add another digit?” While some of it comes down to tradition in how computers are built, to add another digit would mean we’d have to distinguish between different levels of current—not just “off” and “on,” but also states like “on a little bit” and “on a lot.”
The problem here is if you wanted to use multiple levels of voltage, you’d need a way to easily perform calculations with them, and the hardware for that isn’t viable as a replacement for binary computing. It indeed does exist; it’s called a ternary computer, and it’s been around since the 1950s, but that’s pretty much where development on it stopped. Ternary logic is way more efficient than binary, but as of yet, nobody has an effective replacement for the binary transistor, or at the very least, no work’s been done on developing them at the same tiny scales as binary.
The reason we can’t use ternary logic comes down to the way transistors are stacked in a computer—something called “gates”—and how they’re used to perform math. Gates take two inputs, perform an operation on them, and return one output.
This brings us to the long answer: binary math is way easier for a computer than anything else. Boolean logic maps easily to binary systems, with True and False being represented by on and off. Gates in your computer operate on boolean logic: they take two inputs and perform an operation on them like AND, OR, XOR, and so on. Two inputs are easy to manage. If you were to graph the answers for each possible input, you would have what’s known as a truth table:
A binary truth table operating on boolean logic will have four possible outputs for each fundamental operation. But because ternary gates take three inputs, a ternary truth table would have 9 or more. While a binary system has 16 possible operators (2^2^2), a ternary system would have 19,683 (3^3^3). Scaling becomes an issue because while ternary is more efficient, it’s also exponentially more complex.
Who knows? In the future, we could begin to see ternary computers become a thing, as we push the limits of binary down to a molecular level. For now, though, the world will continue to run on binary.
Image credits: spainter_vfx/Shutterstock, Wikipedia, Wikipedia, Wikipedia, Wikipedia
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Facebook Badge

Jim White

Create Your Badge

Followers

Subscribe To Random Things

Posts
Atom
Posts
Comments
Atom
Comments

Blog Archive

  • ►  2019 (697)
    • ►  April (23)
    • ►  March (166)
    • ►  February (188)
    • ►  January (320)
  • ▼  2018 (4481)
    • ►  December (343)
    • ►  November (346)
    • ▼  October (385)
      • Newest Apple Products
      • Halloween Spending
      • 700-HP Electric Car
      • Rockets to Move Cargo
      • Next Version of Windows 10
      • Make Water From Thin Air
      • Amazon Charity
      • Entertainment News
      • Movie Preview - Bohemian Rhapsody
      • Not a Zombie
      • Today's Encouragement
      • Wed Devotional
      • Earn Rewards
      • Plastic Waste Elimination
      • Japanese Princess is a Commoner
      • Couple 'Flabbergasted'
      • Is the résumé dead?
      • Long Goodbye for Merkel
      • Sports
      • Conversation Clean Up Tool
      • Movie Preview - Nobody's Fool (2018)
      • 'Whys' of Life
      • Today's Encouragement
      • Tues Devotional
      • Tiniest House in the World
      • Winterize Your Pool
      • January 2019 Lunar Eclipse
      • Robots to make Robots
      • IBM Buying Red Hat
      • New Vaccine & Drug Combo
      • Lyft Autonomous Initiative
      • Entertainment News
      • Weekend Box Office Results
      • Honoring All Souls
      • Today's Encouragemnt
      • Mon Devotional
      • Movie Review - Johnny English Strikes Again
      • SpaceX Seeks Loan
      • What Passengers Really Want
      • In-flight Meditation
      • Car Salesperson
      • Inserting Microchips
      • What is WiGig
      • Entertainment News
      • Give a Little
      • The Work
      • Power in Prayer
      • Trust His Heart
      • Infamous 'Death Comet'
      • Most Miserable Airport
      • Fit for Life
      • Strange Rectangular Iceberg
      • Sports News
      • eBay launches Instant Selling
      • Nuclear-Armed Submarines
      • Tesla Model Y
      • Change Halloween
      • Entertainment News
      • Are You My Leader?
      • Stop the Sun
      • A Dog's Color
      • the Fine Print
      • Messenger Gets a Makeover
      • Tesla Turns a Profit
      • New Flu Treatment
      • Highest-Paid TV Actors
      • Google Sexual Harassment
      • Historic Find
      • Khashoggi Murder
      • Four Ways
      • Today's Encouragement
      • Fri Devotional
      • Special Security Chip
      • Windows Registry Demystified
      • Navy’s Next Attack Sub
      • Best Android Phones
      • 2019 Electric Motorcycles
      • Super Typhoon
      • Financial News
      • Khashoggi Death Brutal
      • Titanic II
      • Movie Preview - Hunter Killer
      • Our Weaknesses
      • Today's Encouragement
      • Thur Devotional
      • Travel over Sex
      • Google Translate
      • U.S. in the Arctic Circle
      • Longest Life Expectancy
      • 2019 Ford Mustang Shelby GT500
      • Kleenex Rename
      • Death Race
      • Most Destructive Species
      • Movie Preview - Indivisible
      • Hurricane Willa Latest
      • Give No Quarter
      • Today's Encouragement
      • The Only God
      • Mad Scratch Machine
      • Golden Girls Cereal
    • ►  September (373)
    • ►  August (386)
    • ►  July (385)
    • ►  June (359)
    • ►  May (378)
    • ►  April (384)
    • ►  March (396)
    • ►  February (353)
    • ►  January (393)
  • ►  2017 (4506)
    • ►  December (389)
    • ►  November (382)
    • ►  October (399)
    • ►  September (368)
    • ►  August (406)
    • ►  July (386)
    • ►  June (378)
    • ►  May (383)
    • ►  April (354)
    • ►  March (374)
    • ►  February (337)
    • ►  January (350)
  • ►  2016 (3443)
    • ►  December (353)
    • ►  November (360)
    • ►  October (365)
    • ►  September (338)
    • ►  August (329)
    • ►  July (331)
    • ►  June (332)
    • ►  May (356)
    • ►  April (342)
    • ►  March (316)
    • ►  February (21)

Who I B

Dubs
View my complete profile
Picture Window theme. Powered by Blogger.

Translate