機械語に関する記述のうち, 適切なものはどれか。
平成29年度 春期 ITパスポート試験 問70
This question's explanation and your answers so far.
問 70
- ア
正解 Machine language is the only language a CPU can directly interpret and execute; it represents instructions and data as strings of binary bits. Programs written in high-level languages such as Fortran or C, however, cannot be run by the CPU as they are. A language-processing program such as a compiler therefore translates (converts) them into machine language in advance, after which they are executed. Hence choice “ア”, which states that programs written in Fortran or C are converted into machine language before being executed, is appropriate.
Incorrectイ
Machine language is hard for humans to understand but can be executed directly by the hardware (CPU); it is the lowest-level language and is classified as a low-level language. Languages with human-friendly syntax, such as Fortran and C, are the high-level languages, so calling machine language a high-level language is incorrect.
Incorrectウ
Machine language itself is expressed in binary (bit strings) of 0s and 1s, not a string of decimal digits, so the statement is incorrect. Incidentally, hexadecimal is often used to write those long binary numbers more compactly for human readability, but that too is only a convenience for people; machine language itself is neither decimal nor hexadecimal.
Incorrectエ
Programming directly in machine language is cumbersome, error-prone, and has low productivity, so most of today's application software is developed in high-level languages such as Fortran, C, and Java. The statement that it is programmed directly in machine language does not match reality and is incorrect.
- A program written in a high-level language is first translated into machine language by a language-processing program such as a compiler, and then executed (machine language = the language a CPU can execute directly).
- Machine language is a low-level language expressed in binary (0s and 1s), not a string of decimal digits; hexadecimal notation, used to write long binary values compactly, is likewise merely a convenience for human readers.