Jump to content

What is an accumulator and what does this statement mean?


cyberproxy
 Share

Recommended Posts

I'm learning machine code. My questions are:

 

1) What is an accumulator?

2) What does the following statement mean, in simpler form? "The machine instruction to add 1 to the value in accumulator A is 01001100."

Link to comment
Share on other sites

A calculator shows its results in its accumulator, and its machine language is the buttons on the calculator. A calculator that can be programmed converts each key into a code that it stores in memory, for example the 1 key may be stored as an ASCII character 1, 2 as ASCII 2, + as an ASCII +, etc. (Refer to http://en.wikipedia.org/wiki/ASCII). In other words, each key press generates a number (e.g., ASCII) that is stored in memory to represent the key press. The numbers may or may not be ASCII, in general computers do no use ASCII, and their machine languages are much more complex than a calculator. Moreover, many machine languages are obtuse and difficult to learn. The ones for modern microprocessors are not only difficult to learn, they are nearly impossible to use to produce very efficient code. Languages such as C produce better code than almost any programmer, and they are much easier to use.

 

Learning assembly language gives great insight into the inner workings of a computer, but I recommend you learn a simple one such as the 8080, Z80 or 6800. I learned on real machines about 25 years ago, so I have not use any of the emulators you can find when you google "Emulator 8080," "Emulator Z80," or "Emulator 6800." You may need to try a few to find one you like.

 

Add 1 to the value in accumulator A is 01001100 means 01001100+1. You should be able to do the arithmetic.

 

Good luck.

Edited by EdEarl
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.