Newbie Programmers: 30 seconds of your time please...

Started by
31 comments, last by fup 21 years, 2 months ago
quote:Original post by sark
That would be me. And you didn't look very hard.


You are right, I only did a simple search for "binary number tutor", not logical/bitwise operations. Thank you for giving the link ;-)

quote:Original post by Drakex
i already know how to use binary and hex but what i was wondering is what the hell is octal for anyway? i've never seen anything in octal. my dad says they used to use octal back in the 60s on navigation computers in fighter jets in the vietnam war. is that all it's for? lol


Octal is base eight. There are eight possible values, 0 thru 7, before you increment the next digit. Early digital pioneers used the highest possible binary grouping (which is three bits, allowing decimal 0-7), that did not exceed our ability to think in base ten (0-9). Then someone figured out if you add another bit, using the digits 0-9 plus the letters A-F, you could encode more values in a single representation, hexadecimal .. The term "hex" is actually misleading, that would imply base 6 ;-) This allowed a more compact representation, which also allowed TTYs (teletype systems, not remote consoles) use of the alphabet, numbers, punctuation and control codes in a machine translatable form (actually, they only used 7 bits, the eight was sometimes used instead as a parity bit).

I do have the eplainations (somewhere, in one of my term papers) describing why (or likely reasons why) early civilizations used certain enumerations (counting systems) and glyphs (symbols, or letters in our alphabet). If anyone is interested in such trivia, ask me in email, I'll see if I still have the .ps around.

quote:Original post by Radens
hey, there 10 kind of people in the world, those that knows the binary system and those that don´t.
what do you think? do I know it?


And those that don't know grammar (like me.. ;-)


[edited by - Casteele on February 10, 2003 2:32:05 AM]
Advertisement
hmmm, okay, now I am confused....

What''s confusing me now is are we doing this MSBF or LSBF?

Do we count from right to left, or from left to right? I assumed most computer calculations are little endian, so we count from right to left.

So 0000 0001 = 1 not 8 //I''m seperating these into nibbles
and 0000 0010 = 2 not 4
and 0000 0011 = 3 not 12

ditto with hex:
0x01 = 1 not 16
0x02 = 2 not 256
0x12 = 18 not 257

I''m wondering if maybe some people are confused because they''ve done some graphics programming? From what I understand of graphics programming, when you compute the color depth values (the RGB component for true color computing) then the values are MSBF, or big-endian, and therefore you do calculate from left to right (and these values have to be converted for the program).
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
quote:Original post by Dauntless
hmmm, okay, now I am confused....

What''s confusing me now is are we doing this MSBF or LSBF?

Do we count from right to left, or from left to right? I assumed most computer calculations are little endian, so we count from right to left.


Endian refers to byte order, not bit order. Regardless, in binary the smallest number is always on the right, just like with decimal and other bases.

This topic is closed to new replies.

Advertisement