Project Management

Disciplined Agile Applied

by
This blog explores pragmatic agile and lean strategies for enterprise-class contexts.

About this Blog

RSS

Recent Posts

Data Technical Debt: 2022 Data Quality Survey Results

Is Technical Debt A Management Problem? Survey Says...

You Think Your Staff Wants to Go Back to the Office? Think Again.

Contracts, Procurement, Vendors, and Agile

Disciplined Agile 5.4 Released

Categories

#AgileBeyondIT, #ChoiceIsGood, ACP, agile, Agile Alliance, agile-manifesto, book, Business Agility, Certification, Choose your WoW, Conference, Context, Continuous Improvement, contracts, COVID-19, Data Management, database, DDJ, Disciplined Agile, Enterprise Agile, estimation, Fundamentals, Governance, GQM, guesstimation, http://disciplinedagiledelivery.com/principles/be-awesome/, India, information technology, Introduction, Kanban, lean, MANAGEIndia, math, MENA, Metrics, mindset, News, OKRs, Organization, People Management, Planning, PMO, Portfolio Management, Principle, Project Management, Quality, Ranged Estimates, Remote Work, Scrum, Security, skill, software, Surveys, Technical Debt, Technical debt, Terminology, Transformation, value stream, vendor management, VMO

Date

Hexadecimal? Why do computer professionals have different numbering systems?4

linkedin twitter facebook Request to reuse this  

And now for something completely different.  Earlier this week my wife and I celebrated our 16th wedding anniversary. On social media I joked that it was our 10th anniversary in hexadecimal, not realizing that my non-computer nerd friends wouldn't get it.  And that's exactly what happened. So what are computer professionals talking about when they refer to different numbering systems?

 

Bits and Bytes

Digital computers store information as bits, ones and zeros, which in turn are organized into bytes, which are commonly 8 bits.  The words in this blog posting, the numbers in your spreadsheets, the images on the web, all converted back and forth to 1s and 0s.  When it comes to numbers, computer scientists like to think in terms of four numbering systems:

  1. Decimal. This is our normal, arabic numbering system where the digits are 0 through 9.  This is also known as base 10 (there are 10 digits).
  2. Binary. This is how computers store information, using the digits 0 and 1.  This is known as base 2 (there are two digits).  
  3. Octal. The octal numbering system uses three bits, a bit is a 0 or 1, to store numbers. This is known as base 8.  A few groups of people throughout history used octal as their numbering system, and it was commonly used in several computer technologies in the 1960s and 1970s due to 6-bit, 12-bit, 24-bit, and 26-bit architectures.  This is not in use any more, except perhaps as a teaching mechanism in computer science courses.
  4. Hexadecimal. The hexadecimal numbering system uses 4 bits to represent numbers, giving us 16 digits to work with (typically 0-9 plus A-F).  This is also known as base 16.

The following chart converts the decimal numbers 0 through 16 to binary, octal, and hexadecimal. Now you can start to understand my joke.  I've been married for 16 years.  In hexadecimal, that's the number 10, which is 16 + 0, more on this math below.  In octal it would be 20 years and in binary 10000 years (I'm smart enough to not joke about that). 

 

Computer numbering systems - Binary, Octal, Hexadecimal

Figure 1. Comparing numbering systems.

 

How the Math Works

To explain how this works, I need to introduce you to a mathematical symbol: ^ which means "to the power of".  So 10^3 = 10x10x10 = 1000.  2^3 = 2x2x2 = 8.  Any number to the power 0 is 1.  

Let's work through an example.  In this case we'll covert the decimal number 13 to each of the four numbering systems:

  • Decimal:  13 = 1*10^1 + 3*10^0 = 10 + 3.  
  • Binary: 1101 = 1*2^3 + 1*2^2 + 1*2^0 = 8 + 4 + 1.
  • Octal: 15 = 1*8^1 + 5*8^0 = 8+5.
  • Hex: D, because D is the hex digit for 13.

Now let's try something harder, the decimal number 75:

  • Decimal:  75 = 7*10^1 + 5*10^0 = 70 + 5.  
  • Binary: 1001011 = 2^6 + 2^3 + 2^1 + 2^0 = 64 + 8 + 2 + 1
  • Octal: 113 = 8^2 + 8^1 + 3*8^0 = 64+8+3.
  • Hex: 4A = 4*16^1 + A(11)*16^0 = 64+11.

The concept of different numerical bases is a general math concept, it isn't restricted to computers. For example, if you play your cards right you can use different number systems in jokes.  Yeah, that's the ticket.

Posted on: October 02, 2021 08:59 AM | Permalink | Comments (7)
ADVERTISEMENTS

Conformity's an obsession with me.

- George Costanza

ADVERTISEMENT

Sponsors