Monday, May 19, 2008

Mechanical Representation of Binary Math

Fathers’ Day is coming up…

Posted by Owen at 1956 hrs
Technology
Add  |  Remove

  1. I’ll have the kids get you a calculator.  They’re $1 at Wal-Mart.

    Posted by on May 19, 2008 at 2048 hrs


  2. There are 10 types of people on this planet.

    Those who understand binary, and those who don’t…

    -jjg
    DailyScoff.com

    Posted by J. Gravelle on May 20, 2008 at 0913 hrs


  3. I guess there’s 100 of us that can appreciate that abacus (and I’m assuming that Nick’s one of them).

    Posted by steveegg on May 20, 2008 at 0919 hrs


  4. This is roughly how digital chips work with their logic “gates” for computations.
    Except your using electrical on and off voltages at the “input and output lines.

    Posted by on May 20, 2008 at 1010 hrs


  5. So I have a question for the computer/math types.

    How does a computer know the difference between a numerical value and a character.

    For example the character n is 01101110

    But 01101110 also = 110

    How does a computer recognize the difference?

    Posted by on May 20, 2008 at 1103 hrs


  6. >How does a computer recognize the difference?

    Context.

    Posted by on May 20, 2008 at 1341 hrs


  7. Oh well theres a great explanation Jason… So enlightening

    Posted by on May 20, 2008 at 1403 hrs


  8. How does a computer recognize the difference?

    When a computer stores a character it actually uses “O” and “I” in place of 0 and 1, as you might also see on a license plate. They look the same to the untrained eye.

    Posted by Aaron on May 20, 2008 at 1638 hrs


  9. XXPilot,

    Jason is essentially correct. It is context.

    Text editors, for example attempt to translate the data into text characters and if the data contains encodings outside normal text ranges you see gobbledygook. There are editors out there that if you so choose render all data in its raw binary form (a sometimes helpful thing to do). Typically they contain the datastream in hexadecimal (0123456789ABCDEF 10 11 12 13...) display on one side and display the text on the other side of the display, or in the case of ISPF you just type “hex on” and the hex representation of the data in binary appears.

    Open up a GIF image file using notepad.

    On the computer systems I have worked on there is no real way to look at a file or a dataset and determine if they are pure text files or binary files. Extensions on windows/dos systems are arbitrary and do not guarantee anything. You need to read the file and if it contains data that can be translated into text using standard encoding schemes (ASCII is one EBCDIC another, there are more) then it is text, otherwise it is binary data and may or may not represent numbers.

    Aside from that the only real difference is in how much space it takes to store each one. Typically a character is stored in one byte (allowing for 256 different characters) and numbers (of various types) are stored in some multiple of that. However, things vary from language to language and platform to platform.

    Numbers themselves may be stored in files in various ways. The COBOL I am used to can store numbers in three ways, display (using text digits) or it can encode the numbers in other schemes that make better use of storage space or are better for computations.

    Posted by Marcus Aurelius on May 22, 2008 at 2208 hrs


Commenting is not available in this weblog entry.