Judging the Relevance and worth of ideas part 2.pptx
Role of accumulator, program counter, memory address in a microprocessor
1. What is the role of the following for a microprocessor:
Accumulator [Penumpuk] Program Counter [Pembilang
aturcara] Memory address [Alamat ingatan] Given a
microprocessor that consists of 12 address lines for memory
addressing. What is the maximum number of memory locations
that can be addressed? A memory chip has 16-data lines and 8-
address lines. What is the size of the memory? Sketch a
memory map that has 2K Times 16 size. How many bytes of
data available in this memory? What is the purpose of a
microcontroller RAM and ROM?
Solution
a.)
i.) Accumulator:
An accumulator is a register for short-term, intermediate storage
of arithmetic and logic data in a computer 's CPU (central
processing unit). The term "accumulator" is rarely used in
reference to contemporary CPUs, having been replaced around
the turn of the millennium by the term "register." In a modern
computers, any register can function as an accumulator.
The most elementary use for an accumulator is adding a
sequence of numbers. The numerical value in the accumulator
increases as each number is added, exactly as it happens in a
simple desktop calculator (but much faster, of course). Once the
2. sum has been determined, it is written to the main memory or to
another register.
ii.) Program counter:
A program counter is a register in a computer processor that
contains the address (location) of the instruction being executed
at the current time. As each instruction gets fetched, the
program counter increases its stored value by 1. After each
instruction is fetched, the program counter points to the next
instruction in the sequence. When the computer restarts or is
reset, the program counter normally reverts to 0.
In computing, a program is a specific set of ordered operations
for a computer to perform. An instruction is an order given to a
computer processor by a program. Within a computer, an
address is a specific location in memory or storage. A register is
one of a small set of data holding places that the processor uses.
iii.)Memory Address
It is a group of wires or lines that are used to transfer the
addresses of Memory or I/O devices. It is unidirectional.In Intel
8085 microprocessor, Address bus was of 16 bits. This means
that Microprocessor 8085 can transfer maximum 16 bit address
which means it can address 65,536 different memory locations.
b.)
An N–bit address will specify 2N different addresses. In this
sense, the address can be viewed as an N–bit unsigned integer;
the range of which is 0 to 2N – 1 inclusive. We can ask another
3. question: given M addressable items, how many address bits are
required. The answer is given by the equation 2(N - 1) <
M£2N, which is best solved by guessing N.
The memory address is specified by a binary number placed in
the Memory Address Register (MAR). The number of bits in
the MAR determines the range of addresses that can be
generated. N address lines can be used to specify 2N distinct
addresses, numbered 0 through 2N – 1. This is called the
address space of the computer.
Given 12 address lines=2^12 memory locations
c.) A memory chip has 16 data lines and 8 address lines.what is
the size of memory?
2^16= 65536
Memory size= 65536*8
d.) sketch a memory map that has 2k*16 size. How many bytes
of data available in this memory?
2K x 16 memory
• 1 bit + 10 bits = 11 Address inputs
•16 Data outputs
e.)
As you can see, all the operations within the microcontroller are
performed at high speed and quite simply, but the
microcontroller itself would not be so useful if there are not
special circuits which make it complete. In continuation, we are
going to call your attention to them.
4. Read Only Memory (ROM)
Read Only Memory (ROM) is a type of memory used to
permanently save the program being executed. The size of the
program that can be written depends on the size of this memory.
ROM can be built in the microcontroller or added as an external
chip, which depends on the type of the microcontroller. Both
options have some disadvantages. If ROM is added as an
external chip, the microcontroller is cheaper and the program
can be considerably longer. At the same time, a number of
available pins is reduced as the microcontroller uses its own
input/output ports for connection to the chip. The internal ROM
is usually smaller and more expensive, but leaves more pins
available for connecting to peripheral environment. The size of
ROM ranges from 512B to 64KB.
Random Access Memory (RAM)
Random Access Memory (RAM) is a type of memory used for
temporary storing data and intermediate results created and used
during the operation of the microcontrollers. The content of this
memory is cleared once the power supply is off. For example, if
the program performes an addition, it is necessary to have a
register standing for what in everyday life is called the “sum” .
For that purpose, one of the registers in RAM is called the
“sum” and used for storing results of addition. The size of RAM
goes up to a few KBs.