Page 1 of 1 [ 15 posts ] 

Kezzstar
Veteran
Veteran

User avatar

Joined: 23 Feb 2007
Age: 36
Gender: Female
Posts: 1,353
Location: Australia

27 Jan 2008, 4:37 pm

My boyfriend (who did computers and stuff at uni, I'll put up his degree when I remember it) was telling me all about hexadecimals (base-16) and stuff like that.

Anyways I'm looking it up on Wikipedia, but if anyone else knows about it and wants to discuss it, I'd love to learn about it! I LOVE numbers!! !! !! !! !! !! !

Algebra is my favourite LOL.

Also Octadecimals and other counting systems can be discussed here too. I want to know them all!! !! !! !! !


_________________
"It isn't wrong, but we just don't do it."
Gordon, "Thomas the Tank Engine and Friends: Whistles and Sneezes"
http://www.normalautistic.blogspot.com.au - please read and leave a comment!


TheFace
Toucan
Toucan

User avatar

Joined: 20 Jan 2008
Age: 38
Gender: Male
Posts: 273
Location: The Sweaty Palm of Michigan

27 Jan 2008, 7:30 pm

Kezzstar wrote:
My boyfriend (who did computers and stuff at uni, I'll put up his degree when I remember it) was telling me all about hexadecimals (base-16) and stuff like that.

Anyways I'm looking it up on Wikipedia, but if anyone else knows about it and wants to discuss it, I'd love to learn about it! I LOVE numbers!! !! !! !! !! !! !

Algebra is my favourite LOL.

Also Octadecimals and other counting systems can be discussed here too. I want to know them all!! !! !! !! !


Binary is fun too


_________________
My Blog - http://www.thezach.net/blog
My Online Store - http://www.thezach.net/store
The Nasty Truth About Autism Speaks - http://www.thezach.net/about/aspergers/aspeak


pakled
Veteran
Veteran

User avatar

Joined: 12 Nov 2007
Age: 67
Gender: Male
Posts: 7,015

27 Jan 2008, 8:49 pm

there are 10 kinds of people; those who understand binary, and those who don't..;)

Octodecimals are prevalent in IP settings for networks
Hexadecimals for MAC addresses on network cards.

that's about all I run into on either method...;)

I would have like Algebra if it hadn't be about 'how many different ways can you solve this problem?' ONE! GIVE ME ONE!...;)

you go...



Kezzstar
Veteran
Veteran

User avatar

Joined: 23 Feb 2007
Age: 36
Gender: Female
Posts: 1,353
Location: Australia

27 Jan 2008, 8:58 pm

Well, wikipedia was about as useful as tits on a bull.

*goes searching for text books and the like*


_________________
"It isn't wrong, but we just don't do it."
Gordon, "Thomas the Tank Engine and Friends: Whistles and Sneezes"
http://www.normalautistic.blogspot.com.au - please read and leave a comment!


Billard
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 28 Jan 2008
Age: 70
Gender: Male
Posts: 32
Location: Central Iowa, USA

06 Feb 2008, 2:16 pm

Egad! What can you say about hexadecimal?

Human beings (generally) have 10 fingers, and so count by tens therefore we use a decimal based system. Note that there are 10 different symbols (0, 1, ... 8, and 9). After we count to 9, we have to either invent other symbols (not an option), or reuse the ones we have. Therefore, the number after nine -- which is ten -- is written 10. That means we have one ten, and zero units. Ok, this is all first-grade stuff.

However, computers have bits instead of fingers, and so count by 2s. Each bit can have only two values -- 0 or 1. To write a two in binary, you would write 10, meaning one two, and zero ones. Three would be written as 11, meaning one two, and one one. Obviously, for humans this gets tedious quickly.

So people group the bits into either groups of three bits (octal, which is base 8 ) or groups of four bits, which is hexadecimal. Other groupings are possible, but not customarily used. One one of them -- groups of two bits -- even has a name, which is trinary (base 4). I've never seen trinary used in 30 years of programming computers...

Ok. Let's tackle octal before we take on hex(adecimal).

Octal is base eight. That means it has the digits 0...7. To write eight in octal, we're back to 10 again -- 1 eight, and 0 units. The symbols 8 and 9 are not used in octal, just like the digits past 1 are not used in binary.

However, any number can be expressed in binary, octal, decimal, or hexadecimal.

Hex is a little different as it is base 16. That means we need fifteen different symbols. However, our decimal numbering system has only ten different symbols... So, we need to come up with five more symbols. those symbols are the first five letters of the alphabet; A - F.

A = 10 (decimal)
B = 11 (decimal)
C = 12 (decimal)
D = 13 (decimal)
E = 14 (decimal)
F = 15 (decimal)

So... Hexadecimal is base 16. Let's write the digits from zero to 16 in hexadecimal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10.

As you can see in hex, sixteen is written as 10 -- one sixteen, and 0 units.

Math can be done in any base, but I have to admit that I turn to a calculator for any base other than decimal.

Again, the key takeaways from my little posting are:
1. Humans work in base 10; computers work in binary (base 2).
2. Humans group computer bits together to make them easier to work with. Groups of three bits gives you 8 options, which is octal (base 8 ). Groups of four bits is base 16, or hexadecimal.

If you dig around, you can find exceptions to this.
-- There have been computers made that worked in decimal, but those generally were at the dawn of the computer age and are no longer in current usage.
-- Humans have experimented with bases other than base 10 -- base 12 was used a bit -- not sure where -- and that's where we get 12 hour clocks from. Base 12 has some advantages over base 10, insofar as 10 only has two divisors - 2 and 5. Base 12 has twice as many - 2, 3, 4, and 6.

Kezzstar -- what else are you looking for?

-- Bill



shaggydaddy
Toucan
Toucan

User avatar

Joined: 21 Oct 2007
Age: 44
Gender: Male
Posts: 262
Location: California

06 Feb 2008, 2:42 pm

can you count to 15 on one hand :) I can. (binary)

here is a nice bit of fun if you use Windows...

The Calculator can be switched to "Scientific" view [VIEW -> Scientific]

In this view you can convert numbers instantly between Decimal, Hex, Oct, binary.


_________________
If you suffer from Autism, you're doing it wrong.


xyzyxx
Veteran
Veteran

User avatar

Joined: 7 Aug 2007
Gender: Male
Posts: 526
Location: Iowa

06 Feb 2008, 4:25 pm

pakled wrote:
there are 10 kinds of people; those who understand binary, and those who don't..;)

Octodecimals are prevalent in IP settings for networks
Hexadecimals for MAC addresses on network cards.
It's called octal. Eight digits.

Octodecimal would be eighteen... I think.



lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

06 Feb 2008, 7:44 pm

You are quite right xyzyxx. If anyone really wanted a name for base eighteen, it would be octodecimal.

Also... a very nice exposition, Billard. You have one small error. Base four is used occasionally, and is called quaternary (see below). Base three is actually used, and is called ternary (usually) or trinary (less commonly). Oddly enough, the Russians dabbled with computer hardware that operated in trinary. For moderately deep reasons, base "e" (2.71828) has merit, and that's closer to three than it is to two.

Another base that has been popular... sixty - Aztec or Mayan. Think seconds in a minute and minutes in an hour.

Also there are mixed bases. Go one further with the above, and time is measured in the mixed base sequence that is 60, 60, 24, 7, 52 (with the occasional 53rd week in a year). English pounds, shillings and pence was a similar game, along with various weights and measures.

==============
NB. Above, I edited the above. Where it now reads "quaternary", I originally wrote "ternary", but that is the alternate name for base three. I had that wrong. I also edited the bit about base three's pair of names.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Last edited by lau on 07 Feb 2008, 4:00 pm, edited 1 time in total.

Billard
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 28 Jan 2008
Age: 70
Gender: Male
Posts: 32
Location: Central Iowa, USA

06 Feb 2008, 11:00 pm

Lau --

Yep, I messed up on base 3 and 4. I had heard about the trinary computers long ago, but it seemed pretty unique, so did not mention it. :oops:

Octal tended to be used more early on, when character sets were represented in 6 bits (a total of 64 characters was possible). Six bits equates to two octal digits, so it's a nice match.

When character sets later expanded to eight bits (ASCII and EBCDIC), hex started to take over.

The first computer I programmed in assembly (a Honeywell H316 minicomputer at the US Army Satellite Communications Agency) displayed and printed octal characters by default, and the binary front panel was printed to organize the displays into octal digits.

-- Bill


_________________
-- Bill

"The difference between me and a mad man is that he is mad" ? Salvador Dali


twoshots
Veteran
Veteran

User avatar

Joined: 26 Nov 2007
Age: 39
Gender: Male
Posts: 3,731
Location: Boötes void

06 Feb 2008, 11:12 pm

lau wrote:
For moderately deep reasons, base "e" (2.71828) has merit, and that's closer to three than it is to two.


Who the devil uses that? 8O


_________________
* here for the nachos.


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

07 Feb 2008, 1:08 pm

twoshots wrote:
lau wrote:
For moderately deep reasons, base "e" (2.71828) has merit, and that's closer to three than it is to two.


Who the devil uses that? 8O

http://en.wikipedia.org/wiki/Setun

And Billard - I must apologise profusely (grovel, grovel). Base four is quaternery (which I mix up with quaternions). Ternary is indeed, as you say, the more common name for base three (and I'm not at all sure why I've picked up, and held onto, trinary, which is the LESS common word).
http://mathworld.wolfram.com/Base.html


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Billard
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 28 Jan 2008
Age: 70
Gender: Male
Posts: 32
Location: Central Iowa, USA

07 Feb 2008, 3:35 pm

Lau --

Not to worry; I had posted from memory, and I'm getting old enough that some of the bits in main memory 'up there' are getting a little worn and faded. Actually, I did say 'trinary', not ternary. For the purposes of the discussion (and as often as it comes up in Comp SI) either term works for me.

-- Bill


_________________
-- Bill

"The difference between me and a mad man is that he is mad" ? Salvador Dali


lau
Veteran
Veteran

User avatar

Joined: 17 Jun 2006
Age: 76
Gender: Male
Posts: 9,795
Location: Somerset UK

07 Feb 2008, 3:53 pm

Now I'm double-double-de-brained. I didn't look at your original post, where indeed you did describe the usage of two bits per digit as trinary. You think your brain is on the blink --- well, join the (trinary) club!

I went back up and edited my post, because I hate to put out incorrect information. I owned up, at the same time.


_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer


Billard
Tufted Titmouse
Tufted Titmouse

User avatar

Joined: 28 Jan 2008
Age: 70
Gender: Male
Posts: 32
Location: Central Iowa, USA

07 Feb 2008, 8:57 pm

I just feel sorry for Kezzstar, who is probably wondering what the heck those two old guys are talking about!

Shaggydaddy --

Actually, if you have all of your fingers, you should be able to count to 31 on one hand in binary.

And, in a trick I learned from a book called 'Fingermath' a number of years ago, using something like roman numerals on your fingers, you can count to 9 using one hand, and 99 using both. It works like this:

One one hand, the fingers count as units (I) (1...4). The thumb counts as 5 (V). Thus, on that hand you can have VIIII or 9.

On the other hand, the fingers represent tens (X), and the thumb represents 50 (L). So you can represent any number between 0 to 99 using your hands... LXXXXVIIII.

Ohhhh - amaze your friends with this slight of mundane newthink.


_________________
-- Bill

"The difference between me and a mad man is that he is mad" ? Salvador Dali


dark_mage
Sea Gull
Sea Gull

User avatar

Joined: 9 Jan 2008
Age: 41
Gender: Male
Posts: 237

08 Feb 2008, 1:50 pm

I remember learning binary hex and octal back during my Electrical Engineering undergrad but yes they are all useful I think hex is also used for subnet masks as well as MAC addresses (hence the 255.255.255.0 for home networks)