1.
The five important instruction set design issues are as listed below;
- Operation repertoire: How many and which operations to provide, and how
complex operations should be.
- Data types: The various types of data upon which operations are performed.
- Instruction format: Instruction length (in bits), number of addresses, size of
various fields, and so on.
- Registers: Number of CPU registers that can be referenced by instructions, and
their use.
- Addressing: The mode or modes by which the address of an operand is
specified.
2. The types of operands used mainly in machine instruction sets are:
- addresses:
+ Main or Virtual memory address
+ Unsigned Integers
- Numbers:
+ DAll machine languages include numeric types
+ Non-numeric processing: counters, field widths, etc
+ Numbers in a machine are limited by magnitude and precision
+ Consequences: rounding, overflow, underflow
- Characters:
+ Text or character strings
+ Represented by a sequence of bits
+ Morse Code
+ International Reference Alphabet (IRA)
+ American Standard Code for Information Interchange (ASCII)
+ Extended Binary Coded Decimal Interchange Code (EBCDIC)
- logical data:
+ Consider n-bit unit as consisting of n i-bit items of data, each having a value of o or 1
+ Advantages:
store array of Boolean or Binary data items
Manipulating bits of data items
Câu 3: - the International Reference Alphabet (IRA). 1 Each character in this code is
represented by a unique 7-bit binary code; thus, 128 different characters can be represented.
- Packed Decimal:
+ Used when there is a great deal of I/O and simple computation
+ Each decimal digit is represented by a 4-bit code. Ex: 0 = 0000, 1 = 0001
+ Numbers are formed by a string of 4-bit codes usually In multiples of 8-bit
+ 246 = 0000 0010 0100 O110
+ Positive: 1100
+ Negative: 1101
- the relationship between the IRA character code and the packed decimal representation:
For the IRA bit pattern 011XXXX, the digits 0 through 9 are represented by their binary
equivalents, 0000 through 1001, in the right-most 4 bits. This is the same code as
packed decimal.
Câu 4:
- Logical Shift
o Left Logical Shift — Each bit is shifted towards left, MSB is
discarded and LSB becomes 0
o Right Logical Shift — Each bit is shifted towards right, LSB is
discarded and MSB becomes 0
- Arithmetic Shift
o Left Arithmetic Shift — Each bit is shifted towards left, MSB is
discarded and LSB becomes 0, hence similar to logical shift
o Right Logical Shift — Each bit is shifted towards right, LSB is
discarded and MSB becomes 1
Trong khoa học máy tính , kiến trúc tập lệnh ( ISA ), còn được gọi là kiến
trúc máy tính , là một mô hình trừu tượng của máy tính . Một thiết bị thực
thi các hướng dẫn được mô tả bởi ISA đó, chẳng hạn như đơn vị xử lý
trung tâm (CPU), được gọi là thực thi . implementation.
Nói chung, ISA xác định các lệnh được hỗ trợ , kiểu dữ liệu , thanh ghi , hỗ
trợ phần cứng để quản lý bộ nhớ chính , các tính năng cơ bản (chẳng hạn
như tính nhất quán của bộ nhớ , chế độ định địa chỉ , bộ nhớ ảo ) và mô
hình đầu vào / đầu ra của một nhóm triển khai của ISA.
1. Năm vấn đề quan trọng về thiết lập thiết kế được liệt kê dưới
đây;
- Operation repertoire:cho biết Cần cung cấp bao nhiêu và hoạt
động nào cũng như các hoạt động phức tạp như thế nào.
- Data types: Các loại dữ liệu khác nhau mà các hoạt động được
thực hiện.
- Instruction format:gồm Độ dài lệnh (tính bằng bit), số lượng
địa chỉ, kích thước của các trường khác nhau, v.v.
- Registers: Số thanh ghi CPU có thể được tham chiếu bởi các
hướng dẫn và việc sử dụng chúng.
- Addressing: Chế độ hoặc các chế độ mà địa chỉ của một toán
hạng được chỉ định.
Câu 2: Những loại toán hạng điển hình trong tập lệnh máy
- addresses:
+ Địa chỉ bộ nhớ chính hoặc bộ nhớ ảo
+ Số nguyên không dấu
- Numbers:
- + Ngôn ngữ máy DAll bao gồm các kiểu số
+ Xử lý không phải số: bộ đếm, độ rộng trường, v.v.
+ Các con số trong máy bị giới hạn bởi độ lớn và độ chính xác
+ Hậu quả: sai số, lỗi tràn bộ nhớ
- Characters:
+Chuỗi văn bản hoặc ký tự
+ Được biểu diễn bằng một chuỗi các bit
+ Mã Morse
+ Bảng chữ cái tham chiếu quốc tế (IRA)
+ Mã tiêu chuẩn Mỹ để trao đổi thông tin (ASCII)
+ Mã trao đổi thập phân được mã hóa nhị phân mở rộng (EBCDIC)
- logical data
+ Coi đơn vị n-bit bao gồm n 1-bit dữ liệu, mỗi mục có giá trị là o
hoặc 1
+ Ưu điểm:
• lưu trữ mảng các mục dữ liệu Boolean hoặc Binary
• Thao tác các bit của các mục dữ liệu