Casual Articles
#1 in Business Subscribe Email Print

You are here: Home > Computers and Technology > Computers and Technology > History of the Computer - Machine Code Programs Part 2 of 3

Tags

  • years
  • calculate
  • serves
  • simple program
  • format devised

  • Links

  • Characteristics of the Golden Retriever
  • Mar Menor Is A Unique Spanish Holiday Destination
  • Battery Voltage
  • Casual Articles - History of the Computer - Machine Code Programs Part 2 of 3

    Do You Know Who Your Working With When It Comes To Buying Your Home?
    The real estate industry is made up of mostly agents with less than 2 years of experience in real estate. Sure they may have 5-10 years of marketing and sales experience listed on their website along with the grey hair that age brings, but have they really been selling and buying real estate for that long? Let's take a look at a few tools that you as a c
    last three bits are the register to be added to. This instruction will take the contents of register 000 and add them to the contents of register 010. The result will be placed in register 010.

    How do we get data into those registers 000 and 001? We have a STORE instruction. This time the format is:-

    000 011 000

    Once again the first 3 bits are the command - STORE. The next

    How You Can Make $500 to $12,000 a Month in the Natural Health Movement, Without Selling Supplements
    How would you feel if you could quit your job tomorrow and start making your living doing something you love involving health or raw foods? And what if I showed you how to do this and make even more money than you are making now? Sounds enticing?You can easily turn this into a reality. Whether you want to make an extra $500 dollars a month doing what you love, or t
    What components will we be using? We have mentioned Registers as being where data being worked on is stored. One of these is the Program or P register. This is essentially a set of flip-flops, one for each 'bit' of the instruction. Various bits of this register are then decoded to see what the instruction has to do, for example an add or a test for 0.

    Other registers would be used to store data to be added, and for the result, they could also be for data to be sent to a disk or tape drive.

    We will look at a simple program to calculate the area of a rectangle. We can use any dimensions using this program, we will use 3x4 for illustration purposes. For this example we only have 5 instructions we can use, an ADD, a SUBTRACT, a STORE, a BRANCH and a STOP. The stop isn't strictly a normal instruction, but serves the purpose here.

    The program is in memory from location zero onwards and looks like this:-

    (0)000 - 000 011 000 STORE
    (1)001 - 000 100 001 STORE
    (2)010 - 001 000 010 ADD
    (3)011 - 010 001 001 SUBTRACT
    (4)100 - 011 001 010 BRANCH
    (5)101 - 100 000 000 STOP

    The format for these instructions, or the way the bits are laid out, determines what the instruction does, and what data it uses. We are using a format devised for this illustration. For example here is an ADD instruction

    001 001 010

    The first three bits are the 'command', or what the instruction does. 001 is decoded as an ADD. The rest of the instruction tells us what to add. The next three bits are the address of the register to be added. The last three bits are the register to be added to. This instruction will take the contents of register 000 and add them to the contents of register 010. The result will be placed in register 010.

    How do we get data into those registers 000 and 001? We have a STORE instruction. This time the format is:-

    000 011 000

    Once again the first 3 bits are the command - STORE. The next

    Absolute Versus Relative Linking in Web Sites
    What is an absolute link? What is a relative link? Why should you care which one you use? When it comes to how you set up the links on your web site, it's important to use an absolute link (which means that when you link to another page on your web site you specify the complete URL in the link like http://www.yourdomain.com/page1.html). A relative link is when you have an
    ore data to be added, and for the result, they could also be for data to be sent to a disk or tape drive.

    We will look at a simple program to calculate the area of a rectangle. We can use any dimensions using this program, we will use 3x4 for illustration purposes. For this example we only have 5 instructions we can use, an ADD, a SUBTRACT, a STORE, a BRANCH and a STOP. The stop isn't strictly a normal instruction, but serves the purpose here.

    The program is in memory from location zero onwards and looks like this:-

    (0)000 - 000 011 000 STORE
    (1)001 - 000 100 001 STORE
    (2)010 - 001 000 010 ADD
    (3)011 - 010 001 001 SUBTRACT
    (4)100 - 011 001 010 BRANCH
    (5)101 - 100 000 000 STOP

    The format for these instructions, or the way the bits are laid out, determines what the instruction does, and what data it uses. We are using a format devised for this illustration. For example here is an ADD instruction

    001 001 010

    The first three bits are the 'command', or what the instruction does. 001 is decoded as an ADD. The rest of the instruction tells us what to add. The next three bits are the address of the register to be added. The last three bits are the register to be added to. This instruction will take the contents of register 000 and add them to the contents of register 010. The result will be placed in register 010.

    How do we get data into those registers 000 and 001? We have a STORE instruction. This time the format is:-

    000 011 000

    Once again the first 3 bits are the command - STORE. The next

    IT Spending: Educate Your Clients on Smart Purchases
    Often, clients will ask you for advice on their IT spending plans. In this article, you'll learn some ideas to help your clients plan their IT spending.Suggest Your Clients Upgrade Their MachinesYour clients also could earmark the budget surpluses for upgrading and replacing PCs more regularly. Because entry-level PCs are often one-half to two-thirds less ex
    ctly a normal instruction, but serves the purpose here.

    The program is in memory from location zero onwards and looks like this:-

    (0)000 - 000 011 000 STORE
    (1)001 - 000 100 001 STORE
    (2)010 - 001 000 010 ADD
    (3)011 - 010 001 001 SUBTRACT
    (4)100 - 011 001 010 BRANCH
    (5)101 - 100 000 000 STOP

    The format for these instructions, or the way the bits are laid out, determines what the instruction does, and what data it uses. We are using a format devised for this illustration. For example here is an ADD instruction

    001 001 010

    The first three bits are the 'command', or what the instruction does. 001 is decoded as an ADD. The rest of the instruction tells us what to add. The next three bits are the address of the register to be added. The last three bits are the register to be added to. This instruction will take the contents of register 000 and add them to the contents of register 010. The result will be placed in register 010.

    How do we get data into those registers 000 and 001? We have a STORE instruction. This time the format is:-

    000 011 000

    Once again the first 3 bits are the command - STORE. The next

    Ten Ways to Strengthen Your Reading Habit
    Most people wish they read more.  It is an activity that is both fun and enlightening.  It can help us be more knowledgeable and successful.  However, it is an activity that many people don’t engage in very much.  According to the 1999 National Household Education Survey, 50% of the U.S. population aged 25 and over read a newspaper at least once a week, read one or more m
    out, determines what the instruction does, and what data it uses. We are using a format devised for this illustration. For example here is an ADD instruction

    001 001 010

    The first three bits are the 'command', or what the instruction does. 001 is decoded as an ADD. The rest of the instruction tells us what to add. The next three bits are the address of the register to be added. The last three bits are the register to be added to. This instruction will take the contents of register 000 and add them to the contents of register 010. The result will be placed in register 010.

    How do we get data into those registers 000 and 001? We have a STORE instruction. This time the format is:-

    000 011 000

    Once again the first 3 bits are the command - STORE. The next

    Media Transcription
    We are pioneers and experts in supporting Television Media Production companies , Documentary producers, independent Content producers, Media consultants and numerous associated Media professionals in their Transcription needs. Our vast experience gained over customer projects is evident in our satisfied customer feedbacks.B-Roll is an extra footage that can be used to il
    last three bits are the register to be added to. This instruction will take the contents of register 000 and add them to the contents of register 010. The result will be placed in register 010.

    How do we get data into those registers 000 and 001? We have a STORE instruction. This time the format is:-

    000 011 000

    Once again the first 3 bits are the command - STORE. The next 3 bits are the data, decimal 3 in this case, the last three are where to store it - in register 0. We will put decimal 3 in register 0.

    The SUBTRACT instruction is telling us to subtract a value, in this case 1, from the contents of register 1. The result goes in register 1. (An extra bit not shown here would tell the logic to decode the literal, or actual, value of 1 rather than the address of a register).

    The BRANCH instruction is what makes programs capable of powerful things, it is a decision maker. The format is

    011 001 010

    The first 3 bits are interpreted as a BRANCH instruction and enable logic to decode the rest of the instruction. the next 3 bits are the address of a register to test, and the last 3 bits an address in memory to be used to get the next instruction if the test is not met. Various tests are possible, in this case we are testing for 'not 0'.

    The STOP is used here for this illustration only, normally the program would continue.

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.casualarticles.com/article/170361/casualarticles-History-of-the-Computer--Machine-Code-Programs-Part-2-of-3.html">History of the Computer - Machine Code Programs Part 2 of 3</a>

    BB link (for phorums):
    [url=http://www.casualarticles.com/article/170361/casualarticles-History-of-the-Computer--Machine-Code-Programs-Part-2-of-3.html]History of the Computer - Machine Code Programs Part 2 of 3[/url]

    Related Articles:

    Accept Credit Card at Trade Show

    Business Finance Loan For All Your Business Needs

    Buy Cheap Repo Homes From Government Auctions - 5 Tips

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com