Need help for this two questions... 1.) Suppose you go online and buy a word-pro
ID: 3559989 • Letter: N
Question
Need help for this two questions...
1.) Suppose you go online and buy a word-processing application. What format is the software actually in? Is it in a high-level programming language? Is it in assembly language? Is it in the ISA of the computer on which you intend to run the software? Justify your answer.
2.) Given n bits, how many unsigned integers can be represented with the n bits? What is the range of these integers? <-- For this question, I am not sure is it 2^n ? but how do I know the range of the integers ?
Many thanks...
Explanation / Answer
1) A software application like a word processor is translated to machine code when it is compiled, so that it can be executed directly, i.e executable code. Most software programs are written in high-level languages like C++, Java or Assembly language. These programs are then translated to machine code by the compiler which is a low-level language that can be understood by the computer only. For a program to run, it should be in the ISA of a machine, i.e, it should contain the instruction set of the intended machine. Therefore the application is neither in assembly language or high language but in machine code.
2) Maximum number of unsigned integers that can be represented by N-bits is 2N.
The range of unsigned integers is 0 to 2N-1.
The range of signed integers is 2N-1 to 2N-1-1.
For example the range of unsigned integers that can be represented by 3-bits is 0 to (23-1 = 7) giving a total of 8 integers that can be represented.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.