Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Machine code
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Instruction set== {{main |Instruction set}} Every processor or processor family has its own [[instruction set]]. Machine instructions are patterns of [[bit]]s<ref group=nb>On early [[Decimal computer|decimal machines]], patterns of characters, digits and digit sign</ref> that specify some particular action.<ref name="sco-p251">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/251 251]}}</ref> An instruction set is described by its [[UNIVAC_1100/2200_series#Instruction_format|instruction format]]. Some ways in which instruction formats may differ:<ref name="sco-p251"/> * all instructions may have the same length or instructions may have different lengths; * the number of instructions may be small or large; * instructions may or may not align with the architecture's [[Word (computer architecture)|word length]]. A processor's instruction set needs to execute the circuits of a computer's [[Logic level|digital logic level]]. At the digital level, the program needs to control the computer's registers, bus, memory, ALU, and other hardware components.<ref name="sco-p162">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/162 162]}}</ref> To control a computer's [[Computer architecture|architectural]] features, machine instructions are created. Examples of features that are controlled using machine instructions: * [[memory segmentation|segment registers]]<ref name="sco-p231">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/231 231]}}</ref> * [[protected mode|protected address mode]]<ref name="sco-p237">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/237 237]}}</ref> * [[binary-coded decimal]] (BCD) arithmetic<ref name="sco-p236">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/236 236]}}</ref> The criteria for instruction formats include: * Instructions most commonly used should be shorter than instructions rarely used.<ref name="sco-p251"/> * The [[High Bandwidth Memory|memory transfer rate]] of the underlying hardware determines the flexibility of the memory fetch instructions. * The number of bits in the [[Random-access_memory#Addressing|address field]] requires special consideration.<ref name="sco-p253">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/253 253]}}</ref> Determining the size of the address field is a choice between space and speed.<ref name="sco-p253"/> On some computers, the number of bits in the address field may be too small to access all of the physical memory. Also, [[virtual address space]] needs to be considered. Another constraint may be a limitation on the size of registers used to construct the address. Whereas a shorter address field allows the instructions to execute more quickly, other physical properties need to be considered when designing the instruction format. Instructions can be separated into two types: general-purpose and special-purpose. Special-purpose instructions exploit architectural features that are unique to a computer. General-purpose instructions control architectural features common to all computers.<ref name="sco-p283">{{harvnb|Tanenbaum|1990|p= [https://archive.org/details/structuredcomput00tane/page/283 283]}}</ref> General-purpose instructions control: * Data movement from one place to another * Monadic operations that have one [[operand]] to produce a result * Dyadic operations that have two operands to produce a result * Comparisons and conditional jumps * Procedure calls * Loop control * Input/output
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Machine code
(section)
Add topic