Professional Documents
Culture Documents
pengantar
bab-bab sebelumnya telah merasakan sinyal analog, AC sinyal dan dikonversi dari analog ke digital.
Dalam bab ini, pengolahan sinyal digital untuk memodifikasi, menghitung, memanipulasi, mengubah
bentuk sinyal atau untuk rute sinyal ke saluran tertentu dibahas. Semua atau operasi pengolahan ini
mungkin diperlukan untuk menyelesaikan tugas yang telah ditentukan oleh aplikasi yang sedang digenapi.
Total sistem dirancang untuk melakukan tugas, dan prosesor digital adalah bagian yang sangat penting dari
sistem.
CPU
Prosesor digital atau Central
Processing
Komputer Digital INPUTS
Unit OUTPUTS
Sesuai namanya, input prosesor Clock
Figure 6-1 shows the basic structure of a digital processor, more generally called a digital
computer. The main brain of the structure is the CPU
(central processing unit) where the op- Figure 6-1: A digital processor erations that are performed are
decided upon and controlled. The digital signals in the form of binary codes that tell the digital processor
which operation to perform are called instructions. Each digital processor is manufactured to respond to a
particular set of instructions. Each instruction in the set will cause the digital processor to do a unique
operation. For example, an instruction might cause the digital processor to input a digital signal from a
particular input. Or an instruction might tell the processor to take the input signal and store it temporarily,
or to store it in memory more permanently. Another instruction might take a digital signal that has been
operated on by the processor and output it to a particular output. Or an instruction might tell the processor
to do a logical operation (for example, AND two binary numbers together), or to do an arithmetic
operation like ADD two binary numbers, or maybe subtract them. The instructions, presented in sequence
to the processor, are called a program.
Digital Computer Program
The arrangement of the instructions, one after another, for the digital processor to perform set operations in
a particular sequence to accomplish a task is called a program. The set of instructions in a program is
stored in memory to be recalled each time that the desired task is required. If a different task is required,
then a different program is needed.
TIM LRN
Sistem Digital Pengolahan
82
As shown in Figure 6-1. The instructions of a program are stored in memory at specific addresses, usually
in sequence, and are moved from memory to the CPU over the data bus. It is just like a home with a
particular address. The post office uses the address to deliver the mail. In like fashion, the instructions in
memory are at unique addresses. When a particular task is needed, the address of the first instruction in the
program is sent by the CPU to memory over the address bus. The address locates the instruction in
memory, the CPU instructs the memory to read the instruction and it is sent over the data bus to the CPU.
The CPU decodes the instruction and performs the directed operation. Each subsequent instruction in the
program is addressed, recovered from memory, sent to the CPU and executed.
Address and Instruction/Data Bus
Addresses, over the address bus, are not only used to locate instructions in memory but are used to identify
particular inputs or particular outputs. By addressing a particular input, the CPU has selected that input to
supply input data; or addressing a particular output, the CPU will send data to that output to be transmitted
to the next function. And there is another use of addresses. When an instruction calls for an arithmetic
operation, (or other operations that require unique information), such as, ADD A and B, the data A and the
data B must be supplied to the CPU before the operations can be performed. Data A and B and other data
used for the program being executed are stored in another portion of memory, separate from the program.
Data A and Data B are addressed over the address bus just like instructions and recovered and sent to the
CPU. The instructions and the data are transmitted from memory to the CPU over the data bus; thus, this
bus is usually called the instruction/data bus.
Timing and Control
All the CPU operations, all address, instruction, and data transfers, as shown in Figure 6-1, occur in a
timed sequence determined by the timing and control signals derived from the CPU’s clock. The clock is a
circuit that outputs a series of repetitive pulses occurring at a set frequency or set frequencies. The clock
pulses have fast rise and fall times so that circuits can be triggered on either edge to accurately time the
operation of the circuits. The rise time is called the leading edge and the fall time the trailing edge of the
pulses.
Clock signals must be very accurate. As a result, they are generated by phase-locked loops (PLLs), or for
the greatest accuracy, by quartz crystal oscillators. Quartz crystals, of a particular cut and size, when
excited with electricity, will oscillate at a very precise frequency. The clock signals precisely control the
transfers, manipulations, and storage of information throughout the CPU and the accompanying total
system.
Power Systems
Each digital processor has a complete unique power system. Sophisticated systems are required for the
distribution of the supply voltages and the required currents, regulated to keep the variation of voltages to
within tight limits, as the circuits switch rapidly from one state to another. Extensive use of bypass
capacitors at critical junctions help to maintain voltages within limits as significant values of current are
switched along the supply lines.
As the density of integrated circuits has increased, there is more need for heat sinks and cooling air
distribution as the watts/in2 dissipation increases. IC technology has led the way as circuit density
increased within an IC to change the circuit type from bipolar to MOS (metal-oxide-semiconductor) to
TIM LRN 2
Sistem Digital Pengolahan
CMOS (complementary MOS) so that the power dissipation per circuit function has been reduced. As
density further increased, the supply voltages for circuit operation have been reduced from 5V to 3V, and
now 1.8V to again reduce the power dissipation per function. The tight regulation specifications still
remain even with the reduction in the voltage values.
nized in sequence
into a program, is Figure 6-2: A generalized CPU dikirim ke CPU untuk menginstruksikan untuk
melaksanakan operasi tertentu. instruksi berasal dari alamat memori yang terdapat dalam alamat register
instruksi yang disebut program counter. Program ini disimpan dalam memori satu alamat demi satu dalam
urutan sehingga program counter memegang alamat dapat bertambah satu untuk melangkah melalui
instruksi program satu langkah demi satu. Dengan demikian, nama untuk alamat register adalah program
counter. Setiap alamat instruksi dari program counter membahas langkah berikutnya dalam program
sebagai hasil tugas.
TIM LRN 3
Sistem Digital Pengolahan
Contoh 1. Program counter
Menggunakan alamat 4-bit, acara di contoh sederhana bagaimana program counter bertambah untuk
urutan melalui program untuk menambah 16-8.
Larutan:
Program Counter (increment oleh 1) Alamat Ingatan
register inCPU
Instruction Address in sequence
0100
CPU—Instruction Register and Instruction Decoder
As the digital code representing the CPU instruction is retrieved from its memory location it is stored in a
temporary storage register called the instruction register. Here it is recognized and decoded by the
instruction decoder and directed to the appropriate circuits to execute the operation dictated by the
instruction.
CPU—The Data Address Register
If the instruction requires that additional data be fetched from memory, then the next instructions will
direct the CPU to place the address for the data in the data address register, send the address to memory to
retrieve the data and store it in a temporary storage location in the CPU, either a register, or a RAM
location. Through a multiplexing switch, the instruction and data address are sent to memory over the same
bus, the data bus.
CPU—The Arithmetic Logic Unit (ALU)
The ALU provides the logical, computational, and decision-making capabilities of the CPU. Basic
arithmetic operations, such as, addition, subtraction, multiplication, and division; basic logical decisions, as
well as, greater than, less than, equal to, positive or negative are all performed by the ALU.
Registers for temporary storage of data brought from inputs or from memory are available in the ALU. The
information in these registers is used by the CPU for completing the operation directed by the instruction
addressed by the program counter. When the operation is completed the information is erased or replaced
with new information to be used for executing the next instruction.
CPU—Internal Memory
There are internal memories contained within the CPU. They may be additional registers, read-only
memory (ROM) or random-access memory (RAM). They store particular sets of instructions called
subroutines, temporary data, and data routing information. The RAM is of the type that needs to be
refreshed periodically. Some CPUs do not have any ROM or RAM, but usually have the additional
registers. For these CPUs, the ROM or RAM is in the external memory shown in Figure 6-1.
TIM LRN 4
Sistem Digital Pengolahan
Timing and Control
Each of the operations of the CPU is timed and controlled by circuits that operate at specific times. Many
operations occur at the same time; others are sequenced so they operate after data is entered, or
transmitted, or before another operation. The timing and control signals, generated from the master clock
signals, not only time the CPU, but also are distributed throughout to time and control the complete
system.
CPU—Input and Output (I/O)
Not all CPUs have the input and output selection circuits in the CPU; for some, these circuits are external
as shown in Figure 6-1. Figure 6-2 shows the I/O contained in the CPU. The input address registers
determine the particular input that will receive data, and the output address registers determine the
particular output used to couple out data to external destinations. If the CPU needs data, the CPU sends the
address of the input to receive the data to the input address register and inputs the data from that input. The
CPU inputs the data at a select time so that it is synchronized to the operation that is being executed.
Likewise, after the CPU has executed an operation, the resultant data needs to be outputted to complete the
task. The CPU sends the address of the output that is to couple out the resultant data to the output address
register, and, synchronized by the clock, outputs the data.
Contoh 2.
Tampilkan dengan contoh sederhana, menggunakan kode 4-bit, bagaimana input tertentu dipilih oleh CPU.
Alamat
INPUT 0 0000
beban D
4 bit
alamat Register
Masukan E INPUT 1 0001
dengan alamat INPUT ALAMAT C
input yang DAFTAR H INPUT 2 0010
Alamat dari register
diinginkan. AI
D
dikirim ke decoder
E INPUT 3 0011 MEMAS
yang memilih input yang tepat. UKKAN
R
0011
INPUT 15 1111
TIM LRN 5
Sistem Digital Pengolahan
Instuments will be used in Chapter 7 to explain assembly-language programming and in Chapter 10 to
demonstrate the application of MCUs by providing the reader an opportunity for a hands-on project
that can be built from contained instructions.
System Clarifications
System Buses
In Figure 6-1 and Figure 6-2 there are wide signal paths connecting the functional units in the diagrams.
Each of these contains multiple wires connecting between units. Each is called a “bus” because it
represents more than one wire making the interconnections between units. For example, if the memory in
Figure 6-1 has 65,536 different memory storage locations, then a binary address of 16 bits must be used to
address each location. The address bus, as a result, is really 16 wires bundled together, each wire carrying a
binary signal of 1 or 0 to make up the 16-bit word for the address.
Perluasan lokasi memori sebagai bit ditambahkan ke alamat yang ditunjukkan pada Gambar 6-3. Jika
alamat diperluas untuk 24 bit, 16.777.216 lokasi memori dapat diatasi; jika alamat tersebut diperluas untuk
32 bit, 4294967296 lokasi dapat diatasi. Jika masing-masing lokasi memori memiliki sepotong 8-bit
informasi biner (disebut byte), maka 24 bit akan menemukan 16 juta byte informasi; lebih tepatnya,
16.777.216 byte memori, tetapi disingkat dengan menggunakan industri untuk memori 16-Megabyte (16
MB). Dalam mode seperti, alamat 32-bit akan menemukan 4,2 miliar byte atau memori 4.2-Gigabyte (4.2
GB).
Memory and data buses Alamat Alamat Alamat Alamat
are the buses that must
bits lokasi bits lokasi bits lokasi bits lokasi
be the widest (to be able 1 2 9 512 17 131.072 25 33, 554, 432
to handle the largest 2 4 10 1024 18 262.144 26 67, 108, 864
3 8 11 2048 19 524.288 27 134, 217, 728
number of bits at a time) 4 16 12 4096 20 1.048.576 28 268, 435, 456
in order to carry the 5 32 13 8192 21 2.097.152 29 536, 870, 912
6 64 14 16.384 22 4,194,304 30 1, 073, 741, 824
memory addresses and 7 128 15 32,768 23 8,388,608 31 2, 147, 483, 684
8 256 16 65,536 24 16,777,216 32 4, 294, 967, 296
the
instructions required
Figure 6-3: Memory locations vs. address bits by the system. Control buses and timing signal lines
may have only a single line, but in most cases have multiple lines, but their buses hardly need to be as
wide as the address and data buses.
Digital Information Nomenclature and Transfer
Binary strings of bits are identified in a number of ways. Long strings of bits are called words. Modern day
digital computers use 16-, 32-, and 64-bit words. In Figure 6-4a a 16-bit word is shown. In any binary
representations, the most significant bit (MSB) is on the left of the string, and the least significant bit
(LSB) is on the right.
A group of 8 bits, as shown in Figure 6-4a, is called a “byte,” and is a very common grouping used to
identify memory capacity. A 1 MB (1 megabyte) memory has a storage capacity of one million locations
with a byte (8 bits) at each location. Even though a memory may be organized differently, say two million
locations with 4 bits per location, the capacity is still referred to as 1 MB. Years ago this 4-bit group was
used extensively and called a “nibble.”
Sebuah byte, atau jumlah byte, adalah cara yang umum mengidentifikasi sinyal biner lainnya. Sebuah
sinyal kontrol mungkin berisi sejumlah byte. Kode dapat terdiri dari kata-kata yang setiap byte, atau kode
mungkin berisi sejumlah bit. Ini akan lebih diperjelas pada bagian Digital Signal Representasi.
TIM LRN 6
Sistem Digital Pengolahan
MSB LSB
16-kata bit
byte 1 byte 2
Dua byte 8-bit
b. Transfer paralel
MSB LSB MSB LSB
1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1
X - Pergeseran Kanan Arus Informasi XY
Meninggalkan Pergeseran Arus Setelah 11 pergeseran logis ke kanan
Informasi - Y
TIM LRN 7
Sistem Digital Pengolahan
Arithmetic Shifts
Many times the instruction to the processor may only be for one shift because shifting a binary word to the
right divides the binary value by 2. Likewise, shifting a binary word one bit position to the left, multiplies
the binary value by 2. These types of shifts are particularly significant in arithmetic operations.
Contoh 3. Pergeseran aritmatika kiri untuk Perkalian
Tampilkan contoh, menggunakan kata 8-bit, untuk menunjukkan bagaimana menggeser posisi sedikit
nomor satu biner ke kiri mengalikan nilai biner dalam nomor dengan 2. Solusi:
Bit Posisi Nilai 128 64 32 16 8 4 2 1 Original No. Nilai 0 0 0 16 0 4 0 1 = 21
No. asli 0 0 0 1 0 1 0 1
Nilai baru 32 0 8 0 2 0 = 42
nomor asli 1 0 0
0 1
0 1 0 Masukkan 0 bergeser meninggalkan satu bit
Dalam pergeseran beredar kanan, nilai bit di LSB posisi disirkulasikan kembali dan disisipkan pada
posisi MSB. Setelah 16 jam shift, bit dari kata 16-bit bergeser keluar dan diidentifikasi, dan, setelah
pergeseran selesai, data yang sama dalam kata 16-bit seperti sebelumnya proses pergeseran dimulai.
pergeseran tersebut sangat berguna dalam aritmatika dan pergeseran logis tanpa merusak hadir data asli
sebelum shift.
informasi biner dapat mengidentifikasi nomor baik positif dan negatif. Untuk melakukan hal ini, MSB dari
kata biner dicadangkan untuk menjadi sedikit tanda. Jika bit adalah 0, jumlah biner adalah positif; jika bit
adalah 1, jumlah biner negatif. Selama pergeseran aritmatika, bit tanda di posisi MSB dipertahankan. Jadi,
ketika pergeseran terjadi, nilai di posisi MSB dimasukkan kembali ke posisi MSB, sehingga tetap sama
dan nilai aritmatika dari jumlah biner tidak hilang. Contoh untuk kode 4-bit diperlihatkan pada Gambar 6-
5.
Sinyal biner Bilangan desimal karakter perintah
MSB LSB atau atau
0 0 0 0 0 @ \ P p 0 0 Daya OFF
Ketika 0 0 0 1 1 SEBUAH Sebuah Q q 1 1
2 B b R r
BERHENTI MSB = 0 0 0 1 0
3 C c S s
2 2 GO mewakili 0 4 D d T t 0 1
1 3 3 A ON 8 5 E e U u positif 0 1 0
0 4 4 Sebuah 6 F f V v nomor OFF 0 1
0 1 5 7 G g W w 5 B ON
8 H h X x
0 1 1 0 6 6 B OFF 0 1 1 1 7 7 KANAN
9 saya saya Y y
1 0 0 0 8 0
: J j Z z
KIRI
; K k [ {
Ketika 1 0 0 1 9 -1 MAJU MSB = 1 1 0 1 0 10 -2 < L l \ | KEMBALI
mewakili 1 0 1 1 11 -3 IDLE 8 negatif 1 1 0 0 12 -4 = M m ] } SPEED 1 angka
1 1 0 1 13 -5 SPEED 2 > N n ^ ~
? HAI Hai - DEL
1 1 1 0 14 -6 BRAKE
1 1 1 1 15 -7 POWER ON
Kolom 1 2 3 4 5 6 7 8
ASCII bit 4321 5, 6, 7 110 001 011 101 111
TIM LRN 8
Sistem Digital Pengolahan
Gambar 6-5: sinyal digital dapat mewakili angka, huruf, karakter
khusus, perintah, dan sebagainya.
Satu dapat melihat transfer paralel informasi yang tercepat karena butuh waktu yang signifikan untuk
menggeser keluar bit untuk identifikasi dalam transfer serial. Namun, ada tradeoff yang signifikan dalam
hardware meningkat sirkuit, meningkat interkoneksi, meningkat disipasi daya, dan sebagainya. Serial
operasi panggilan untuk hanya satu rangkaian deteksi di LSB atau posisi MSB untuk mengidentifikasi bit.
operasi paralel membutuhkan sirkuit untuk setiap bit sehingga bit dapat diidentifikasi semua pada waktu
yang sama. perkalian ini sirkuit, interkoneksi, lebih banyak kekuatan terjadi di seluruh sistem.
Trade off kemudian adalah salah satu di antara kecepatan operasi dibandingkan jumlah hardware. Tapi
pengolahan IC, perangkat dan teknologi sirkuit memiliki dampak yang luar biasa pada tradeoff ini, seperti
yang dibahas lebih rinci dalam Bab 8. Kemajuan oleh IC kepadatan per chip, kecepatan operasi lebih cepat
dan operasi daya rendah dan protokol sirkuit baru mengurangi pemisahan di tradeoff ini dan operasi serial
adalah mendapatkan digunakan.
2. 1 0 0 1 0 1 0 J
3. 1 1 0 0 1 1 1 g
4. 0 1 1 1 1 1 1 ?
What has been demonstrated is that within different digital systems, the binary information can represent
many different things—numbers, characters, symbols, commands, instructions, and so on. System
designers will define how the codes are used in particular systems.
TIM LRN 10
Sistem Digital Pengolahan
1 2 3 4 5 6 7 8 9 10
t=0
wakt
A u untuk C = AB
1 jalur 1
Baca
TIM
LRN
11
Sistem Digital Pengolahan
Sebuah tabel kebenaran, yang ditunjukkan pada Gambar 6-6b, mengidentifikasi output nilai Q' untuk setiap
nilai masukan D Q dan. Ini mengidentifikasi keadaan sinyal sebelum dan sesudah jam.
DAN Kontrol Gerbang
Another example of signal timing is shown in Figure 6-6c. Here a 2-input AND gate is used to time a
control signal. The control signal required tells a memory to read information from memory. The address
of the information has been received by the memory and decoded prior to the receipt of the control signal.
An AND gate is used to provide the memory read signal at a precise time. As the truth table shows, both
inputs to the AND gate must be a 1 for the output to be a 1. If both or one input is a 0, the output is a 0. By
placing the memory read signal on the A input to the AND gate, when it is a 1, the memory is to be read.
However, the control signal to actually tell the memory to read will not occur on the output of the AND
gate until the clock signal is a 1. As a result, the memory is read at a precise time determined by the clock.
The read signal on the input to the AND gate overlaps the clock signal in time, and can vary significantly
in time position in relationship to the clock and still be timed correctly. The AND gate output, the memory
read pulse in this case, turns out to be the same width as the clock pulse.
The fact that a clock may have different phases adds to the flexibility of the timing and control signals. For
example, the clock used in Figure 6-6b might use Phase 2, while the clock used in Figure 6-6c might be
Phase 4. This demonstrates the flexibility, mentioned previously, that a designer has to time the system
circuits.
Interrupts
A signal that controls a digital processor at unexpected or random times is called an interrupt. It interrupts
the digital processor from what it is doing and directs it to do something different, as indicated by the
interrupt signal. A STOP signal terminates whatever the processor is doing. It usually occurs at random
times depending on the need to shut down the processor. Or maybe the processor is following a program
and input signals are required. When the inputs are available, the input circuits notify the digital processor
that the inputs are present. This initiates an interrupt to the processor, which halts what it is doing and
inputs the data. After the data is inputted, the processor continues from the place it was interrupted. The
CPU keeps track of where the processor is when the interrupt occurred.
Similar action occurs at the outputs. The processor is required by the program to output data to an external
unit. The processor addresses the I/O and selects an output. The output circuits send an interrupt to the
CPU to signify that the output is ready. The interrupted processor switches to a routine to output the data.
When the transfer to the output is complete, the processor returns to the program location directly after the
location at which it was interrupted.
The application of a digital processor may be dictated by its response to an interrupt. Some processors
respond very quickly to interrupts so that the overall performance to execute its program and complete a task
is not affected. While other processors may be slow to respond to interrupts, and, therefore, if an application
depends on many interrupts, the overall performance of the processor will be slowed a great deal. The
ultimate speed at which the processor can accomplish the task is severely limited. Some digital processors
only respond to an interrupt when they want to, not randomly or unexpectedly. Most modern digital
processors respond quickly to interrupts that occur at random and unexpected times. Status Bits
Digital processors operate using control signals derived from the condition of check bits called status bits.
Status bits are stored in a register. A register is a chain of latches strung together to temporarily store a set
number of bits; as an example, a 16-bit register stores 16 bits. Most registers store the number of bits in the
TIM LRN 12
Sistem Digital Pengolahan
word being used throughout the digital system. The status register is somewhat different. It holds a variety
of different bits where the state of each bit is somewhat independent of the other bits in the register. Many
of the bits are set independently and their value depends on the result of a particular processor operation.
For example, what was the sign of a number as a result of an arithmetic operation—positive or negative? A
status bit is set after the operation is executed to indicate the result. Was the result of an arithmetic
operation greater or less than zero? A status bit is set to indicate the result. Was there a carry or a borrow
when an arithmetic operation was performed? Is the number too large for the digital system to handle? The
setting of status or condition bits after such operations, and the checking of the bits by the processor,
contribute to the control of the operation of the digital processor as it executes its program.
Contoh 6.
TIM LRN 13
Sistem Digital Pengolahan
machine (processor) understands. The digital code that the machine understands is called machine code. A
computer program written in machine code is called a machine-language program.
Machine-Language Programs
Humans can write programs in machine language. To do so, the programmer writes the program directly in
the digital codes that the machine understands. No conversion is necessary. The machine can decode the
instructions directly and execute them to accomplish the task required. However, the task is extremely
difficult, tedious and time consuming, and if errors are made, and they will be regularly, it becomes an
even more difficult and tedious task to find the errors and correct them.
Assembly-Language Programs
Dalam rangka untuk membuatnya lebih mudah untuk menulis program, produsen prosesor digital telah
merancang prosesor mereka untuk merespon instruksi yang lebih dekat dengan bahasa manusia.
Instruksi ini disebut petunjuk perakitan-bahasa. Mereka lebih mudah dipahami daripada kode mesin
tetapi membutuhkan produsen untuk menyediakan program untuk mengkonversi petunjuk perakitan-
bahasa ke dalam kode mesin. Program tersebut disebut assembler. Sebuah komputer jauh lebih akurat
dalam melakukan konversi, dan dengan mengolah program bahasa assembly untuk prosesor tertentu
menggunakan assembler nya, semua petunjuk dikonversi sangat akurat ke dalam kode mesin untuk
prosesor itu.
Ilmu tentang cara menghafal
Operasi atau tindakan bahwa instruksi perakitan bahasa menyebabkan prosesor untuk melakukan
diidentifikasi oleh singkatan yang disebut mnemonic a. Singkatan digunakan untuk mnemonic memberikan
saran yang kuat untuk programmer apa instruksi tidak. Gambar 6-7a menunjukkan contoh instruksi
aritmatika dan tindakan mereka diarahkan, dan memberikan mnemonic yang mewakili masing-masing
petunjuk. mnemonic adalah singkat dua atau tiga huruf simbol yang mengidentifikasi untuk programmer
tindakan prosesor yang disebabkan oleh instruksi. Gambar 6-7b memberikan gambaran tentang apa jenis
lain dari petunjuk mungkin tersedia dalam prosesor digital.
Hitung yg membantu ingatan Tindakan
Menambahkan A atau AD atau ADD Selain dari dua kode biner
Mengurangi S atau SU atau SB Pengurangan dari dua kode biner
Berkembang biak MPY Kalikan dua kode biner
Membagi DIV Membagi dua kode biner
Nilai mutlak ABS Ambil nilai absolut dari bilangan biner
Penyangkalan NEG Perubahan tanda bilangan biner
Bergeser ROL atau ROR Bergeser ke kiri atau bergeser ke kanan
Kenaikan INC atau INR Tambahkan 1 ke kode biner
Pengurangan Desember atau DCR Kurangi 1 dari kode biner
TIM LRN 14
Sistem Digital Pengolahan
operan
Dalam sebuah instruksi assembly-bahasa, instruksi itu sendiri menggambarkan operasi yang akan
dilakukan, tapi tidak mengatakan apa yang akan dioperasikan pada; Oleh karena itu, operan (apa yang akan
dioperasikan pada) harus ditambahkan ke petunjuk. Sebagai contoh, instruksi:
Mov A, B
The mnemonic MOV means that a move operation is to be performed and the operands are register A and
register B. The contents of register A are to be moved to register B. Suppose that register B is the program
counter; therefore, it contains the memory address of the next instruction of a program or subroutine. By
loading register A with the address of the first instruction of a program, moving the contents of register A
to register B a new program is started. Incrementing register B (subtracting one from its contents) with the
instruction:
Inc B,
causes the processor to step to the next instruction. After the instruction is executed, the program loops
back to the Inc B instruction and the processor steps to the next instruction. The processor steps through
addresses of the instructions in sequence to execute the program.
Canggih Bahasa Pemrograman
Penulisan program komputer untuk melakukan tugas terdiri dari pengorganisasian petunjuk prosesor
digital ke dalam urutan yang benar. Ini adalah proses kertas yang tidak memerlukan pembangunan
perangkat keras, tetapi hanya memahami petunjuk prosesor dan menggunakan mereka untuk
memanipulasi hardware yang ada untuk melakukan tugas yang diperlukan. Dengan demikian, program
disebut perangkat lunak, dan orang-orang yang menulis program disebut insinyur perangkat lunak atau
hanya programmer. Ini adalah tujuan dari programmer untuk menulis program mereka dalam bahasa
sebagai dekat dengan bahasa manusia mungkin. Mereka juga ingin belajar bahasa pemrograman tertentu
dan tidak dibatasi untuk menggunakannya hanya untuk satu prosesor. Mereka ingin menerapkan
pengetahuan mereka tentang bahasa untuk prosesor lainnya memecahkan masalah aplikasi lainnya.
Untuk memenuhi kebutuhan ini,
Sophisticated programming languages are a step up and beyond assembly-language programming. They
are, once learned, used for writing many different programs, using different processors. Such languages are
referred to as high-level languages because they are somewhat general purpose because they are used to
program different processors.
Whatever high-level language is used one thing is certain, the program must be converted to machine-
language code. In earlier times this was a two-step process. First a program called a compiler converted the
high-level language to assembly language. Then, an assembler was used to convert the program to machine
code. Today most compilers convert the high-level language directly to machine code. In addition, many
digital processors are members of a family of processors; the compiler for a particular processor usually
handles the whole family of processors.
Software Summary
Figure 6-8menyediakan ringkasan pemrograman. Sebuah prosesor digital dapat diprogram langsung dalam
bahasa mesin, tetapi sangat membosankan dan sulit untuk menemukan kesalahan. Atau dapat diprogram
dalam bahasa assembly, dimasukkan melalui program yang dirancang khusus (assembler) yang mengubah
program ke kode mesin. Atau dapat diprogram
TIM LRN 15
Sistem Digital Pengolahan
menggunakan tingkat tinggi yang canggih langsung di Bahasa campuran Bahasa canggih bahasa tujuan umum.
Itu Bahasa mesin pemrograman
pemrograman Program harus
dimasukkan melalui program yang
assembler Penyusun
dirancang khusus (compiler) yang
mengubah instruksi bahasa highlevel ke
dalam kode mesin untuk tertentu
prosesor yang digunakan. Fortran Kode mesin Kode mesin Kode mesin
meja
b. 8-bit adder A dan B
TIM LRN 16
Sistem Digital Pengolahan
1
11
1 00
11
11
C6 C5 C2 C1
Membawa 1 1 1 0
A 01 1 01 1
Membawa
penuh penambah blok diagram, tetapi juga meja kebenarannya. Sebuah tabel kebenaran, ingat, katalog
keadaan output untuk semua negara bagian input. Jika A atau B atau Ci adalah 1, jumlah bit akan menjadi
1. Ketika A dan Ci atau B dan Ci atau A dan B adalah 1, jumlah bit adalah 0 dan Co akan menjadi 1.
Ketika A dan B dan Ci semua 1s, jumlah bit adalah 1 dan Co adalah 1. Gambar 6-9b menunjukkan
penambah 8-bit dan penambahan dua 8-bit nomor A dan B. Perhatikan bagaimana Co output dari satu
tahap penambah menjadi input Ci ke tahap berikutnya ke kiri. Contoh ini menunjukkan bagaimana
membawa sedikit dihasilkan dan merambat untuk menentukan jumlah bit pada tahap berikutnya.
Kecepatan operasi penambah ditentukan oleh berapa lama membawa untuk menyebarkan melalui adder.
Menggunakan penambah beberapa kali, ditambah pergeseran, menyediakan fungsi perkalian.
tions, ditambah pergeseran, hasil dalam fungsi divisi.
Fungsi ALU-Logic
S S
SEBUAH C C E
E
B
TIM LRN 17
Sistem Digital Pengolahan
MSB. A 1 muncul sebagai hasil
untuk fungsi AND
C 0 1 1
1 1
1 1
1
b. OR berfungsi untuk
mengubah nilai bit
Gambar 6-10: fungsi Logika hanya ketika A dan B
adalah 1. 1 muncul sebagai hasil C ketika A atau B atau keduanya adalah 1 dalam OR fungsi. Komplemen
dari input-1 jika input adalah 0, atau 0 jika input adalah 1-akan muncul sebagai hasil C untuk fungsi
TIDAK. Rangkaian elektronik yang melakukan fungsi TIDAK disebut inverter.
Contoh menggunakan OR fungsi untuk mengatur bit tertentu dalam bilangan biner untuk nilai tertentu
ditunjukkan pada Gambar 6-10b. Dalam 8-bit bilangan biner untuk A, 01.110.110, bit B0 dan b3 dan b7
adalah 0. Program mengharuskan bit B0 dan b3 diatur ke 1. Dengan melakukan fungsi OR antara A dan B,
dimana B adalah biner nomor 00001001, hasil C akan memiliki bit b0 dan b3 set ke 1. bit yang 1s di B
akan diatur ke 1 dalam hasil C.
alamat informasi di Gambar 6-11: Data ke dan dari memori dan input / output
T
I
M
L
R
N
1
8
Sistem Digital Pengolahan
ingatan. Ukuran memori menentukan jumlah bit dalam kode. Data bus baik akan memiliki data di
dalamnya yang diletakkan di sana oleh mikroprosesor untuk menyimpan dalam memori (menulis ke
memori), atau akan memiliki data atau instruksi yang datang dari lokasi alamat (membaca dari memori) ke
mikroprosesor. Apakah memori sedang ditulis atau dibaca dari dikendalikan oleh membaca / menulis
sinyal. Selain itu, setiap kali memori yang akan digunakan, apakah menulis atau membaca, sinyal
memungkinkan dikirim ke memori untuk mengaktifkannya. membaca / menulis dan mengaktifkan sinyal
dihitung sinyal kontrol yang beroperasi di kali dirancang tepat.
Input / output atau I / O sirkuit beroperasi sangat mirip dengan memori seperti yang ditunjukkan pada
Gambar 6-11b. mikroprosesor mengirimkan alamat I / O pada bus alamat untuk menentukan I / O yang
akan digunakan. Pada saat yang sama, sinyal kontrol menceritakan I / O yang ingin input data ke
mikroprosesor melalui bus data; atau bahwa ia ingin output data yang mikroprosesor adalah menempatkan
pada bus data. Seperti dengan memori, sinyal kontrol waktunya memungkinkan I / O sirkuit. Mereka tidak
aktif sampai mengaktifkan sinyal tiba.
mengatasi Mode
instruksi program memberitahu prosesor digital apa yang harus dilakukan, di mana untuk menemukan
informasi itu untuk digunakan dengan instruksi, dan di mana untuk menempatkan hasilnya setelah
instruksi dijalankan. Alamat atau pengalamatan yang dibutuhkan untuk mengarahkan prosesor ke lokasi
yang benar. Mode pengalamatan adalah sarana yang instruksi menunjukkan alamat. Mereka adalah cara
yang dirancang bahwa instruksi memberitahu prosesor cara untuk menemukan informasi yang dibutuhkan
untuk digunakan dengan instruksi. Ada beberapa mode pengalamatan yang umum untuk prosesor digital.
Lima yang berbeda ditunjukkan pada Gambar 6-12, 13, 14, 15 dan 16.
segera Mengatasi
Segera pengalamatan yang digambarkan pada Gambar 6-12. Program counter berisi alamat memori yang
menunjuk ke kode operasi (kode op) dari instruksi-instruksi pengoperasian ingin prosesor untuk
melakukan. Berikut segera setelah kode op, di lokasi memori berikutnya, adalah data yang instruksi akan
beroperasi. Jadi jika instruksi ditujukan dengan segera menangani, kode yang
menggambarkan operasi yang akan
dilakukan di lokasi memori ditangani oleh
isi dari program counter, dan data dalam
lokasi memori berikutnya. Ada relatif
sedikit decoding. instruksi tahu segera di
Ingatan mana data
Prog. Melawan (petunjuk )
(operan)
Memori Loc. Kode OP
berada.
+ Kode op terkandung di lokasi memori
Data yang ditunjuk oleh PC diikuti, di depan
lokasi memori, dengan data yang
akan digunakan.
TIM LRN
19
Sistem Digital Pengolahan
mendaftar Mengatasi berbeda dengan mengubah indeks dalam
Gambar 6-13diagram mendaftar instruksi.
Sumber dan tujuan data yang terdapat dalam
Ingatan
data tidak con Prog. Melawan (petunjuk ) Sumber
tained di memori Memori Loc. OP Kode S, D Membaca mendaftar # Data (operan)
lokasi tetapi di sandi
Tujuan
register. Di- mendaftar # Data (operan)
struction mengandung
menangani. Berikut kode op dan register. instruksi berisi kode op dan menetapkan
daftar sebagai lokasi data. Dalam kasus
ditampilkan, data yang terkandung dalam register
menspesifikasikan di mana untuk kedua sumber dan tujuan.
TIM LRN
20
Sistem Digital Pengolahan
Gambar 6-15: Indexed menangani
TIM LRN
21
Sistem Digital
Pengolahan
00 0 0 0 0 1 1 HAI Tujuan 1 0 0 0 1 0 1 0
00000100 D
00000101 E
00000110
00 0 0 0 1 1 1
10 0 0 0 0 0 1 0 1 1 1 0 1 1 1
Isi lokasi memori 10000001 dipindahkan ke
lokasi memori 10001010
1 0001000
10 0 0 1 0 0 1
1000101001110111
Program counter menunjuk ke alamat memori di mana instruksi MOV @ R1, R2 @ berada. R1 dan R2 adalah
nomor register dan tanda @ menunjukkan bahwa isi dari register adalah alamat dalam memori di mana
informasi yang instruksi adalah untuk mengoperasikan berada. instruksi, dengan MOV sebagai kode op,
mengatakan memindahkan isi dari lokasi memori yang alamatnya adalah isi dari R1 (sumber) ke lokasi memori
yang alamatnya adalah isi dari R2 (tujuan).
Ringkasan
Ini melengkapi diskusi tentang operasi dasar dari prosesor digital, beberapa fungsi spesifik, dan bagaimana prosesor
dibuat untuk melakukan apa yang diperintahkan oleh program untuk melakukan tugas yang diinginkan. Dalam bab
berikutnya, diskusi berpusat pada rincian pemrograman prosesor.
TIM LRN 22
Sistem Digital
Pengolahan
Bab 6 Kuis
1. Sebuah prosesor digital, lebih sering disebut komputer digital, memiliki unit yang merupakan otak
dari sistem yang disebut:
a. I / O-input / output.
b. memori permanen.
c. memori sementara.
d. CPU (central processing unit).
2. Setiap prosesor digital diproduksi untuk menanggapi:
a. berbagai set instruksi yang berbeda.
b. set tertentu instruksi.
c. hanya satu atau dua instruksi.
d. hanya input / output petunjuk.
3. Sebuah prosesor digital merespon program yang:
a. dirancang untuk secara acak beroperasi prosesor di banyak urutan yang berbeda.
b. selalu berubah setiap kali berjalan prosesor.
c. seperangkat operasi dalam urutan tertentu untuk menyelesaikan tugas.
d. tidak dibutuhkan oleh prosesor untuk sebagian besar tugas.
4. Instruksi / data bus yang digunakan:
a. untuk mengirim alamat untuk mencari petunjuk dan data yang akan dikirimkan ke CPU.
b. untuk mengidentifikasi input dan output untuk menerima atau data output untuk CPU.
c. untuk mengirim informasi waktu di seluruh sistem.
d. a dan b hanya di atas.
e. c hanya di atas.
5. sinyal clock pada prosesor digital:
a. tepatnya mengontrol transfer, manipulasi dan penyimpanan informasi di seluruh prosesor. b.
harus sangat akurat dalam waktu.
c. adalah serangkaian pulsa berulang yang memiliki kenaikan
yang cepat dan turun kali. d. semua di atas.
e. dan c hanya di atas.
6. sistem tenaga dalam prosesor digital:
a. harus memiliki regulator tegangan yang sangat akurat dan baik kontrol disipasi daya.
b. tidak memerlukan tegangan yang tepat atau kontrol saat.
c. memerlukan sedikit perhatian untuk disipasi daya.
d. beroperasi dengan tegangan tinggi dan arus tinggi.
7. Perangkat yang telah memberikan kontribusi yang paling untuk disipasi daya rendah prosesor
digital adalah: Sebuah. transistor daya.
b. transistor logika bipolar.
c. sirkuit CMOS-melengkapi-metal-oxide-semiconductor-terintegrasi.
d. campuran perangkat bipolar dan MOS.
8. Data bus membawa ke memori kode digital mewakili:
a. alamat instruksi dan alamat data.
b. hanya alamat instruksi.
c. hanya alamat data.
d. bukan dari salah satu di atas.
TIM LRN 23
Sistem Digital
Pengolahan
TIM LRN 24
Sistem Digital
Pengolahan
TIM LRN 25