|
Machine code, also called machine language, is a computer language that is directly understandable by a computer's CPU (central processing unit), and it is the language into which all programs must be converted before they can be run. Each CPU type has its own machine language, although they are basically fairly similar. After the source code for a program has been written by one or more humans in a programming language (e.g., C or C++), it is compiled (i.e., converted) into machine code by a specialized program called a compiler, or by an assembler in the case of assembly language. This machine code is then stored as an executable file (i.e., a ready-to-run program) and can be executed (i.e., run) by the operating system any time it is instructed to do so by another program or by a user. Machine code is extremely difficult for humans to read because it consists merely of patterns of bits (i.e., zeros and ones). Thus, programmers who want to work at the machine code level instead usually use assembly language, which is a human-readable notation for the machine language in which the instructions represented by patterns of zeros and ones are replaced with alphanumeric symbols (called mnemonics) in order to make it easier to remember and work with them (including reducing the chances of making errors). In contrast to high-level languages (e.g., C, C++, Java, Perl and Python), there is a nearly one to one correspondence between a simple assembly language and its corresponding machine language. Programs for the first electronic computers were written directly in machine code. However, the development of assembly language from the 1950s led to a large increase in programmer productivity. Initially, programs written in assembly language programs were hand-translated into machine code, but this tedious task was later eliminated by the development of assemblers to automate the translations. |
Computer Buses A computer system consists of different devices.CPU must be able to communicate with all devices. The devices are connected together by a communications channel called bus. A bus consists of a set of communication lines or wires. It is used to move a large amount of bits in the form of electrical pulses from one unit to another. The bus is used to connect the following units: Central Processing Unit Control Unit Arithmetic and Logic Unit Main Memory ( RAM, ROM) Input / Output Devices Bus is a common path to transfer data and commands between CPU, memory and input / output devices.It is also used to send or receive data from secondary storage.The capacity of a bus depends on the number of data lines in it.A bus with 16 lines can carry 16 bits or 2 bytes at a time. A bus with 32 lines can carry 32 bits or 4 bytes at a time . Types Of Buses Different types of buses are as follows: 1. Data Bus 2.Addres...
Comments
Post a Comment