Computer's signal is only 0 and 1 binary system?

Discussion in 'Computer Science & Culture' started by Saint, Nov 14, 2020.

  1. Saint Valued Senior Member

    Messages:
    4,752
    Computer's signal is only 0 and 1 binary system?
    How does computer recognize and make sense of all 0 and 1?
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. billvon Valued Senior Member

    Messages:
    21,634
    By concatenating many bits.

    A four bit computer could represent 16 numbers:
    0000=0
    0001=1
    0010=2
    0011=3
    0100=4

    etc all the way up to

    1111=15

    The simplest computers are 8 bit. Modern main processors (as in laptops or desktops) are 32 or 64 bit.
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. geordief Valued Senior Member

    Messages:
    2,118
    Does 11111111=1515? (in a 4bit computer)
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
  7. billvon Valued Senior Member

    Messages:
    21,634
    Well you can't represent 11111111 in a 4 bit computer.

    1111 1111=255 (in decimal) in an 8 bit computer. However that's awkward and programmers prefer to use a different system. Your system isn't bad, but is 1515 one-five-one-five or two fifteens? Confusing. You could write it 15 15; that would work. Programmers prefer to use a system called hexadecimal where A=10 B=11 C=12 D=13 E=14 F=15. So in your case your number would be written as FF.

    Some digital representations use something called BCD (binary coded decimal.) In that system 1111 1111 is illegal. The highest number you can represent is 1001 1001 (99.)
     
  8. Janus58 Valued Senior Member

    Messages:
    2,394
    Let's use the 8-bit computer example. For this example I'll use the 6502 processor.
    All operation instructions are stored in memory, with each memory "address" holding 8 bits (1010 1001, for example)
    The processor has has 8 connections for sending or receiving these 8 bits all at once ( this is called the data bus)
    It also has 16 lines called the "address bus" which it uses to indicate which memory address it wants to access. ( By outputting either a 1 or 0 on separate lines. These 16 lines then, taken together, are decoded by the hardware to access a particular memory location.)

    Each address can contain either data or an instruction (called an Op-code)
    So for example, 1010 1001 could represent the number 169 decimal, or the ascii code for ")" character( with even parity*), or the op code telling the mico-processor to take the data in the following address location and load it into its accumulator ( a register in the processor).

    How the processor treats what is at each address depends on what it "expects" to find there.
    When it first turned on, The 6502 first looks at a two specific addresses. The data it finds there gives it the address of the first instruction of the program it will first start running.**

    So if these two addresses contain 0000 0001 and 0000 1000, the computer will access address 0000 0001 0000 0001 ( 0011 in hex), and treat the data there as an Op-code.

    If that address held 1010 1001, the computer takes this to mean "take the data in the next address location (0012 hex) and load it into the accumulator".
    We will assume that the next address held the value of 0010 0000, so it will store 0010 0000 in its accumulator.
    It then looks at address 0013 hex, for the next op-code.
    Let's say that the next three address locations contain
    1000 1101
    1100 0000
    0000 0000

    1000 1101 is the op-code for " take the contents presently in the accumulator and store it in the address location indicated by the data in the next two address locations". ( in this case the "lower half" of the address is first, followed by the "upper half", so this means that the computer will take the accumulator contents (0010 0000) and store it at memory address 0000 0000 1100 0000 (00C0 hex).
    The computer then goes on to execute the instruction it finds at address 0016 hex ( 0000 0000 0001 0110 binary).

    The processor continues doing this until it hits an op-code of 0000 0000, which is the "break" command.

    * parity is a means of data checking. It only takes 7 bits to encode all the characters, so the extra bit is used to double check for possible data corruption. For even parity, the leading digit is made either a 1 or 0 in order to make the total number of "1"s an even number. If the computer then checks and finds and odd number of "1"s it will halt and indicate an possible data error.

    ** These first instructions will normally be stored in permanent memory, and will be the "boot" or start up routines for the computer.
     
  9. arfa brane call me arf Valued Senior Member

    Messages:
    7,832
    I look at it this way, son:

    If you have just 1 bit, the only operation is transforming it to a 0 (how 0 and 1 are interpreted is where the computational freedom comes from). So that means the only Boolean lattice you can construct, is one that defines the operation of logical negation.

    With two bits you get a lattice that defines both the OR and the AND binary ops (and keeps the structure of the lattice on 1 bit, so you still have unary logical negation). This 2-bit 'limit' appears to be some kind of fundamental principle of binary logic; but it makes sense because a binary operation has to act on a pair of things, right?

    As the number of bits increases, you get more complex lattices; a computer program is a walk through a lattice graph whose complexity depends on the word size of a computer.
     
  10. parmalee peripatetic artisan Valued Senior Member

    Messages:
    3,266
    Heh, I've got a small pile of 4 bit SRAMs which I've cannibalized from various pieces of equipment over the years. I've kind of run out of ways to get creative with them, and their (relatively) massive size is no longer "charming."
     
  11. Saint Valued Senior Member

    Messages:
    4,752
    Gate invented Basic programming?
    And the DOS system?
     
  12. origin Heading towards oblivion Valued Senior Member

    Messages:
    11,888
    No.
    No.
     
  13. parmalee peripatetic artisan Valued Senior Member

    Messages:
    3,266
    I'm a bit confused here -- didn't Saint once claim to be a lecturer in Quantum Mechanics or something?
     
  14. Janus58 Valued Senior Member

    Messages:
    2,394
    The Basic programming language was developed in the 1960s by John G. Kemeny and Thomas E. Kurtz as a means for students to be able to use computers.

    DOS stands for Disk Operating System. An early DOS was CP/M. While Intel originally wanted to use CP/M, they couldn't strike a deal with its owners. They then turned to Microsoft*. Gates, in turn, went to a company called Seattle Computer Products, which had developed their own DOS ( a variant of CP/M). Microsoft bought it from them, and this is what eventually became MS-DOS.

    *Actually they went to Microsoft first, thinking they owned CP/M, and Microsoft directed them to the company that did.
     
  15. Saint Valued Senior Member

    Messages:
    4,752
    Why IBM looked to use MS-DOS and made Gate rich?
     
  16. Janus58 Valued Senior Member

    Messages:
    2,394
    What part of my last post did you not understand?
    1.Intel needed a disk operating system for their computers and they originally wanted to use CP/M, but they couldn't come to terms with the owners for its use.
    2. Microsoft found another DOS that had been developed by another company and was able to buy it from them.
    3. Microsoft and Intel did come to terms, and Intel computers starting using this DOS (and further versions of it) in their computers.
     
  17. billvon Valued Senior Member

    Messages:
    21,634
    Lots of people claim lots of things here on the Internet.
     
  18. Saint Valued Senior Member

    Messages:
    4,752
    What I read is when IBM wanted to sell PC of intel-based, she found Gate to supply her with MS-DOS.
    Sun microsystem was ruled out because she used motorola chips.
     
  19. James R Just this guy, you know? Staff Member

    Messages:
    39,397
    Yeah, but he was obviously telling lies about that. I suspect he's unemployed. Or maybe employed by a company collecting material on English usage for its upcoming dictionary/grammar guide.
     
  20. psikeyhackr Live Long and Suffer Valued Senior Member

    Messages:
    1,223


    Research von Neumann architecture.
     
  21. Write4U Valued Senior Member

    Messages:
    20,069
    Would it not be interesting if Saint is a GPT3 , learning about computers and itself by extension. And everyone here thinks they're talking to a human.....

    I've tried to find "tells" like this;
    Why "she", instead of "it" ? This mistake would be made only by a non-english speaking programmer or a non-english speaking program

    I asked Saint once if he/she/it was a learning AI and got no response. ?????
     
  22. Write4U Valued Senior Member

    Messages:
    20,069
    That simple?
    10010101 = 128 + 16 + 4 + 1 = 149 ? I like it!
     
  23. sideshowbob Sorry, wrong number. Valued Senior Member

    Messages:
    7,057
    I used to ne able to write pure machine code (in decimal or hexadecimal) for the 6502.

    Please Register or Log in to view the hidden image!

     

Share This Page