Exam 1 (Chapter 1, 4, 5, 6) Flashcards
What is a processor?
A hardware component and is responsible for the whole computation process of the system
What is a microprocessor?
A device that is developed on a single integrated circuit. All other units like the I/O unit, a communication unit, and control unit are outside of the chip or integrated circuit. It is visualized in the general-purpose like a personal computer.
What is a microcontroller?
A complex device in which the processor and some of the other units are contained in it. The units like memory, A/D converter or D/A converter, DMA controller, parallel I/O interfaces, and hardware responsible for debugging software are included in the microcontroller unit. They are meant for special purposes and are implemented in devices like displays, modems, refrigerators, and washing machines.
What makes a microcontroller different from a microprocessor?
The difference between the microprocessor and the microcontroller is the incorporation of modules like the following:
- Timers
- Communication interfaces including serial or parallel
- Converters like Analog to Digital or Digital to Analog
- Interface circuitry
- Direct Memory Access (DMA) module
Microcontroller incorporates some of the modules into its chip whereas microprocessors are only a processor on a single chip or a single integrated circuit.
How many bits can the HCS12 CPU manipulate in one operation?
The HCS12 microcontroller is a 16-bit microcontroller. Therefore in one operation, it can manipulate 16 bits
How many different memory locations can the HCS12 access without the expanded memory?
Number of memory locations
= 2^16 = 65536
Why must every computer have some amount of nonvolatile memory?
- Every computer is possessing software and hardware for its operation.
- The software that is responsible for the start-up of the computer resides in the memory part of the hardware.
- For a system to start up or being its functionalities, t possesses an interface between the hardware and the user which is called software.
- The software should not be erased from the memory, since it is accessed every time.
- Hence in order to have un-erasable code in the computer, it needs non-volatile memory which is readable only in functionality.
Therefore, there is a need for non-volatile memory for every computer.
Why must every computer have some amount of volatile memory?
- Whenever a computer is operating, it has to fetch the data on which it has to perform arithmetical operations.
- the data to be fetched resided in the memory segments of the computer.
- If the processor goes on fetching the data from the memory, the number of time cycles required increases thereby increase the execution time.
- To decrease the execution time in a processor, the data is fetched to volatile memory from the main memory.
Therefore, in order to have effective execution time, volatile memory is needed in every computer.
What is a source code?
Source code means the set of instructions that are written by the programmers. it is a high-level language that is understood by human beings. it is converted into machine language with the help of other utilities in order to make the computer understand.
Examples: C, C++, Java
What is object code?
Object code is the set of instructions that are understood by the machine or CPU or processor. The original source code written in the High-level programming language is converted to object code which is in machine-level language by the utility called a compiler. the machine-level language is also called assembly-level language.
Convert 5K, 8K, and 13K to decimal representation.
5K = 5(1024) = 5120 8K = 8(1024) = 8192 13K = 13(1024) = 13312
Write an instruction sequence to configure Port A and Port B for input and output, respectively; read the value of Port A and output the value to Port B.
DDRA = 0x00; DDRB = 0xFF; PTB = PTA;
Give an instruction to configure the pins 7, 5, 1, and 0 of Port B for output and the remaining pins for input.
DDRB = 0xA3;
Assume that ax = 83 and bx = 11. What is the value of ax/bx?
#include int main () { int ax = 83; int bx = 11; int cx = ax/bx; printf("ax/bx = ", cx); return 0; }
OUTPUT:
ax/bx = 7
Assume that ax = 97 and bx = ax % 23. What is the value of bx?
#include int main () { int ax = 97; int bx = ax%23;
printf("bx = ", bx); return 0; }
OUTPUT:
bx = 5