What Is Computer Programming Anyway?

Discussion in 'Python' started by youssef_edward3000@yahoo.com, Jun 8, 2009.

  1. Guest

    Computer programming in plain language, is giving
    instructions to a computer to do something. Technically it
    is actually giving instructions to the microprocessor - the
    brain of a computer.

    If the instructions are only for the microprocessor, why a
    computer is so complicated with numerous types of hardware
    accessories?

    All the other hardware are to support the function of
    feeding the instructions to the microprocessor, and
    conveying the result from the microprocessor to its user -
    which can be a human or another computer or hardware.

    Every time you want a computer to do something you have to
    give the instructions. Luckily people are smart enough to
    figure out that since we might want the computer to repeat
    the same process over and over again, we better store the
    instructions into a permanent storage - hard disk, CD, flash
    memory etc.

    The stored instructions are called COMPUTER PROGRAM or
    computer software and the act of arranging the instructions
    is called COMPUTER PROGRAMMING and the person that is
    responsible to arrange the instructions is called
    ......COMPUTER PROGRAMMER ...do you see the pattern here?

    On the lowest level, a microprocessor only understands a
    limited set of instructions. To a microprocessor the
    instruction sets and data are read in �binary� form.

    Binary means 2 states � such as in on and off, high and low,
    left and right. To make it easier mathematically, binary
    normally is represented by 1 and 0. Electrically, 1
    represents high voltage and 0 represents low voltage.

    On the hard disk, program instructions look just like a
    stream of 1s and 0s. But a microprocessor reads in the
    stream one chunk at a time. Among normal chunk sizes are 8,
    16, and 32. Chunk size is normally referred to as
    instruction size.

    One binary data (that can be a 1 or a 0) is called a �bit�.
    For example a data �1001� is a 4 bit data. Where first bit
    is 1, second bit is 0, third bit is another 0 and the fourth
    bit is 1.

    Bit is the computer terminology for �chunk�.

    How instructions can be represented by bits?

    One bit data can only represent 1 out of 2 possible states �
    either 1 or 0. Which in real world can be used to represent
    things such as on or off, high or low, black or white � any
    2 states condition?

    If we increase the instruction size to 2 bits, then we can
    represent 4 instructions � 00, or 01, or 10 or 11. If we
    increase the size to 3 bits then we can represent 8 possible
    instructions � 000, 001, 010, 011, 100, 101, 110 and 111

    If you notice the trend from the above examples is that
    maximum possible number of instructions is the power of 2 of
    the bit size. That is 2 bits can represent maximum of 2^2
    (which is 4) instructions, and 3 bits can represent maximum
    of 2^3 (which is 2x2x2 = 8) instructions.

    So 8 bits data can represent maximum of 2^8 (2x2x2x2x2x2x2x2
    = 256) instructions (or states) and 32 bits data can
    represent 2^32 (4,294,967,296) instructions.

    You can actually read a program stream contents using
    certain editor � normally called HEX editor. Using these
    special text editors you can look at the instructions in
    binary, hexadecimal, octal, and decimal format.

    I�ll cover the details of what each of the above format
    (hex, oct and dec) means in other article.

    Permission is granted for this article to forward, reprint
    or distribute, use for ezine, website, offer as free bonus
    or part of a product for sales as long as no changes are
    made and the byline, copyright and the resource box is
    included.

    For more information about programming and computers, visit
    http://tips-made-easy.info/computer
    , Jun 8, 2009
    #1
    1. Advertising

  2. Mensanator Guest

    On Jun 8, 9:34 am, ""
    <> wrote:
    > Computer programming in plain language, is giving
    > instructions to a computer to do something. Technically it
    > is actually giving instructions to the microprocessor - the
    > brain of a computer.
    >
    > If the instructions are only for the microprocessor, why a
    > computer is so complicated with numerous types of hardware
    > accessories?
    >
    > All the other hardware are to support the function of
    > feeding the instructions to the microprocessor, and
    > conveying the result from the microprocessor to its user -
    > which can be a human or another computer or hardware.
    >
    > Every time you want a computer to do something you have to
    > give the instructions. Luckily people are smart enough to
    > figure out that since we might want the computer to repeat
    > the same process over and over again, we better store the
    > instructions into a permanent storage - hard disk, CD, flash
    > memory etc.
    >
    > The stored instructions are called COMPUTER PROGRAM or
    > computer software and the act of arranging the instructions
    > is called COMPUTER PROGRAMMING and the person that is
    > responsible to arrange the instructions is called
    > .....COMPUTER PROGRAMMER ...do you see the pattern here?
    >
    > On the lowest level, a microprocessor only understands a
    > limited set of instructions. To a microprocessor the
    > instruction sets and data are read in binary form.
    >
    > Binary means 2 states such as in on and off, high and low,
    > left and right. To make it easier mathematically, binary
    > normally is represented by 1 and 0. Electrically, 1
    > represents high voltage and 0 represents low voltage.
    >
    > On the hard disk, program instructions look just like a
    > stream of 1s and 0s. But a microprocessor reads in the
    > stream one chunk at a time. Among normal chunk sizes are 8,
    > 16, and 32. Chunk size is normally referred to as
    > instruction size.
    >
    > One binary data (that can be a 1 or a 0) is called a bit .
    > For example a data 1001 is a 4 bit data. Where first bit
    > is 1, second bit is 0, third bit is another 0 and the fourth
    > bit is 1.
    >
    > Bit is the computer terminology for chunk .
    >
    > How instructions can be represented by bits?
    >
    > One bit data can only represent 1 out of 2 possible states
    > either 1 or 0. Which in real world can be used to represent
    > things such as on or off, high or low, black or white any
    > 2 states condition?
    >
    > If we increase the instruction size to 2 bits, then we can
    > represent 4 instructions 00, or 01, or 10 or 11. If we
    > increase the size to 3 bits then we can represent 8 possible
    > instructions 000, 001, 010, 011, 100, 101, 110 and 111
    >
    > If you notice the trend from the above examples is that
    > maximum possible number of instructions is the power of 2 of
    > the bit size. That is 2 bits can represent maximum of 2^2
    > (which is 4) instructions, and 3 bits can represent maximum
    > of 2^3 (which is 2x2x2 = 8) instructions.
    >
    > So 8 bits data can represent maximum of 2^8 (2x2x2x2x2x2x2x2
    > = 256) instructions (or states) and 32 bits data can
    > represent 2^32 (4,294,967,296) instructions.
    >
    > You can actually read a program stream contents using
    > certain editor normally called HEX editor. Using these
    > special text editors you can look at the instructions in
    > binary, hexadecimal, octal, and decimal format.
    >
    > I ll cover the details of what each of the above format
    > (hex, oct and dec) means in other article.


    Don't knock yourself out on our account, we won't be reading it
    anyway.

    >
    > Permission is granted for this article to forward, reprint
    > or distribute, use for ezine, website, offer as free bonus
    > or part of a product for sales as long as no changes are
    > made and the byline, copyright and the resource box is
    > included.
    >
    > For more information about programming and computers, visithttp://tips-made-easy.info/computer
    Mensanator, Jun 8, 2009
    #2
    1. Advertising

  3. On Mon, 08 Jun 2009 11:25:31 -0700, Mensanator wrote:

    > On Jun 8, 9:34 am, ""
    > <> wrote:


    [snip]
    >> I ll cover the details of what each of the above format (hex, oct and
    >> dec) means in other article.

    >
    > Don't knock yourself out on our account, we won't be reading it anyway.


    Mensanator, is your delete key broken?

    Quoting vast reams of texts, only to make a single-line comment at, or
    close to, the very end, is one of the more annoying and obnoxious habits
    of clueless n00bs and computer incompetents. You really don't want to
    follow their bad habits.

    Amusingly, such cluelessness is parodied by the term "AOL!" used as an
    interjection:

    http://general.computerdictionaries.org/Jargon-File-Dictionary/AOL!

    The reason this is amusing is that I see you have an AOL email address.


    --
    Steven
    Steven D'Aprano, Jun 9, 2009
    #3
  4. Mensanator Guest

    On Jun 8, 6:45 pm, Steven D'Aprano <st...@REMOVE-THIS-
    cybersource.com.au> wrote:
    > On Mon, 08 Jun 2009 11:25:31 -0700, Mensanator wrote:
    > > On Jun 8, 9:34 am, ""
    > > <> wrote:

    >
    > [snip]
    >
    > >> I ll cover the details of what each of the above format (hex, oct and
    > >> dec) means in other article.

    >
    > > Don't knock yourself out on our account, we won't be reading it anyway.

    >
    > Mensanator, is your delete key broken?


    No, but I gotta remember to use it. Qouting EVERYTHING is the
    default on Google. I think in the early days Google didn't
    quote anything by default and people got mad, so they changed
    it to quote all.

    >
    > Quoting vast reams of texts, only to make a single-line comment at, or
    > close to, the very end, is one of the more annoying and obnoxious habits
    > of clueless n00bs and computer incompetents. You really don't want to
    > follow their bad habits.


    I rarely give it that much thought, but you're right, quoting just the
    one sentence would have sufficed. Although, technically, if someone
    hadn't
    read the original post, they would better appreciate my comment. (I
    know,
    no exuse.)

    >
    > Amusingly, such cluelessness is parodied by the term "AOL!" used as an
    > interjection:
    >
    > http://general.computerdictionaries.org/Jargon-File-Dictionary/AOL!


    I never do that, I fancy myself a wit.

    >
    > The reason this is amusing is that I see you have an AOL email address.


    Funny, there *WAS* I time when I used a *real* news server,
    but AOL decided to cancel it one day and told all their subscribers
    to "just use Google".

    >
    > --
    > Steven
    Mensanator, Jun 9, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. A. M. G. Solo
    Replies:
    0
    Views:
    521
    A. M. G. Solo
    Jan 13, 2006
  2. A. M. G. Solo
    Replies:
    0
    Views:
    776
    A. M. G. Solo
    Jun 8, 2006
  3. Replies:
    0
    Views:
    340
  4. A. M. G. Solo (do not reply to this email address)
    Replies:
    0
    Views:
    716
    A. M. G. Solo (do not reply to this email address)
    Nov 8, 2006
  5. A. M. G. Solo
    Replies:
    0
    Views:
    726
    A. M. G. Solo
    Dec 5, 2006
Loading...

Share This Page