Tuesday, December 12, 2006

Which Type are You?

There are 10 types of people in this world: those who understand binary, and those who don’t.

There’s a beauty in homeschooling in that you can teach what you think is appropriate in all subject areas. Now, with something as objective as math, I generally follow the curriculum pretty closely. However, there is something lacking in our otherwise very good Saxon math books. My oldest daughter is doing eighth grade work now, and she has yet to learn number systems other than base 10.

When I was in seventh grade, I taught myself binary using an old Commodore Vic 20 instruction manual. Remember those? I believe it had 3K of memory. For comparison, the Atari 2600 game console had 5K, I believe. Anyway, one of the games that came with the used system I bought would sometimes fail right in the middle and give me a “Syntax Error.” What I discovered when this happened intrigued me. I found that as I typed keys after this program had failed that some of the keys displayed parts of the pictures from the games, rather than the expected characters (A, B, C, etc.) I wanted to learn how to do this, so I pulled out the manual and discovered that you could alter the character set for each letter by assigning several 8 bit codes to each letter. Where the bit was “turned on” the pixel was lit up. Where it was off, the pixel was off. This translated into the 1’s and 0’s that made up the number. In the first position was 2 to the 0 power, or “1.” In the second position was 2 to the 1st power, or “2.” In the third position was 2 to the 2nd power, or “4,” and so on continuing to 2 to the 7th power (which was 128). If I wanted any of these pixels lit up I just added that number to the grand total. This gave a number anywhere between 0-255. In no time at all, I was modifying my character fonts. In the process, I was learning a valuable lesson that I would later use in my college days, as well as on the job from time to time. What I didn’t have explained to me was the ease at which binary converts to hexadecimal. I didn’t manage to grasp that concept until after my college IBM 370 Assembler class.

Anyway, from time to time, I’ll go over a few lessons on binary with the children. To count to ten in binary, you count this way (starting at zero):

0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010

It’s easy when you think about it. When you count in decimal, you run out of numbers after you use up 9. So, you count: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. What comes next? There’s no single digit to represent the next number in binary, so you have to use a combination of digits to represent numbers greater than 9. So, we use 1 followed by 0, or “10.” Binary is the same way, it’s just you run out of numbers much faster. In the above example where I count to ten in binary, you start: 0, 1, then oops…we don’t have another digit, so we have to start combining, though the value is only two. So, two in binary has to be represented as a combination of 1 followed by 0, or “10.” The next number, 11, is three, then oops, we have to add another column, because we’ve used up the digits again. That’s when we get 100, which is 4. And so on…I think you get the picture.

Whereas binary uses only 1’s and 0’s, hexadecimal uses 0-9, and A-F. It is base 16. Therefore, after 9, the next digit is A (having a value of ten), followed by B, and so on to F (having a value of 15). Computers only recognize binary. But hexadecimal is a great help to programmers. The quick little conversion thing is this. Four bits (binary digits) are needed to make a single hexadecimal digit. 0000 (binary) equates to 0 in hex. 1111 (binary) equates to F in hex. Two of these hexadecimal digits make up a “byte” or 8 binary digits. Therefore, programmers have an easier type representing computer commands and values using hex rather than decimal. Knowing that each hex digit converts straightforward to a binary value, it’s easy to see why hex is the preferred notation.

For some reason, Saxon Math doesn’t think this is an important concept to pass on to my children, at least not from Kindergarten through eighth grade. Well, that’s OK. I bring the topic up from time to time. When my children want to learn programming, they’ll have a head start over all those modern “wimp” programmers who’s GUI environment fills everything in automatically. In the old days, we actually had to allocate our own memory…programmers today have it easy… I’ll teach my children programming “heritage,” not just the path of ease… (this last paragraph written somewhat tongue in cheek!)

So, of the 10 types of people, which type are you? I’ll give you a hint, there’s only two!


Captain Kirk said...

I don't know if you see comments on older posts .. but here goes anyway.

I LOVE that statement - I used to use that as a tagline to my e-mails, "There are only 10 types of people in the world, those who know ..."

We might even have met somewhere. My family attends North Gabriel Christian Assembly in Cedar Park and we have visited what is now called Trinity Reformed Baptist in Frisco.

I came across your site while looking for Geoff Botkins 200 year plan spreadsheet.

I've actually thought of creating that in MS Projects instead. Thanks for posting yours as a starter/sampler. !!

Blessings to you and your family in our Lord Jesus Christ !!

Chris Schuttger

Captain Kirk said...

I don't know if you see comments on old blog posts .. but here goes anyway.

I too love that saying and have used it as an e-mail tagline in the past, "there are two kinds of people ..." Having come from much the same background as you - 360 Assembler. I still have my "green card'.

I found your site searching for Botkin's spreadsheet. Thanks for posting that. I have given thought to putting it in MS Projects instead ... more date / gantt chart focused. Of course not everyone has access to project mgmt software.

Lastly .. we might have met somewhere. I attend North Gabriel Christian Assembly in Cedar Park, Texas. It is a sister church to Sovereign Grace Family Church in Carrollton, Texas - which is now meeting in Frisco and called Trinity Reformation Baptist.

Anyway ... thanks for posting the spreadsheet.

Blessings to you and your family in our Lord Jesus Christ !!!

- chris schuttger

Mike Southerland said...

Thanks Chris,

Yes, we probably did meet. I attended Sovereign Grace for about 4 months before relocating to Oklahoma City.

There was a time in December or January where we met halfway in Waco and had a combined service. I didn't remember the name of your assembly, but I believe one of your teaching elders is Don Hart, correct?

We'll see what the Lord is doing. We love our church out here in OK, but He may move us back to the Dallas area. If so, we'd be back at Trinity Reformation Baptist.

Drop me an email at mike@mikesoutherland.com. I'll stop by your blog as well.