What are the total number of lines written in C/C++? What is the most complicated/valuable program written in C/C++?
What compiler was used?
Have you studied buses? What types?
Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what is the latency of an instruction in a 5 stage machine? What is the throughput of this machine ?
Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what is the latency of an instruction in a 5 stage machine? What is the throughput of this machine ?
Ans.
A sample microprocessor pipeline has following five stages.
Instr Fetch-> Decode -> Execute -> Memory-> Write Back
Throughput =1 inst/clock
Latency =5 clocks.
The expansion bus (where expansion cards go) is an extension of the Central Processor, so when adding cards to it, you are extending the capabilities of the CPU itself. The relevance of this regard to the BIOS is that older cards are less able to cope with modern buses running at higher speeds than the original design of 8 or so MHz. Also, when the bus is accessed, the whole computer slows down to the bus speed, so it’s often worth altering the speed of the bus or the wait states between it and the CPU to speed things up.
The PC actually has four buses;
-> the processor bus connects the CPU to its support chips,
-> the memory bus connects it to its memory,
-> the address bus is part of both of them, and
-> the I/O (or expansion) bus is what concerns us here(carries input and output).
The difference btw = and == is :
in code if you type ,
a=5; /* means the value 5 will be assigned to 5 therfore = is an assignment */
/* operator*/
if(a==5) /* here == is used to compare , in otherwords == is used only to */
/* compare the values here 5 is not assigned to a , but it checks */
/* the value of a with 5 if true then proceeds with the loops*/
12 Comments on C questions for a hardware engineer
What is the difference between = and == in C?
= is an assignment operator
a=b; //b’s value is stored in a
if( a==b) // a’s value is compared with b
What are the total number of lines written in C/C++? What is the most complicated/valuable program written in C/C++?
How many bit combinations are there in a byte?
128 combinations from
8′h00
8′hff
Have you studied buses? What types?
Have you studied pipelining? List the 5 stages of a 5 stage pipeline. Assuming 1 clock per stage, what is the latency of an instruction in a 5 stage machine? What is the throughput of this machine ?
Ans.
A sample microprocessor pipeline has following five stages.
Instr Fetch-> Decode -> Execute -> Memory-> Write Back
Throughput =1 inst/clock
Latency =5 clocks.
Have you studied buses? What types?
Bus Types
The expansion bus (where expansion cards go) is an extension of the Central Processor, so when adding cards to it, you are extending the capabilities of the CPU itself. The relevance of this regard to the BIOS is that older cards are less able to cope with modern buses running at higher speeds than the original design of 8 or so MHz. Also, when the bus is accessed, the whole computer slows down to the bus speed, so it’s often worth altering the speed of the bus or the wait states between it and the CPU to speed things up.
The PC actually has four buses;
-> the processor bus connects the CPU to its support chips,
-> the memory bus connects it to its memory,
-> the address bus is part of both of them, and
-> the I/O (or expansion) bus is what concerns us here(carries input and output).
How many bit combinations are there in a byte?
If there are 8 bits in a byte, then the total number of combinations should be 2^8 = 256 no?
dude, why would there be 256 combinations? hahahaha
But you are right about the 8 bits in a byte, but the 8th bit is 128.
So that means that ninth bit is 256, meaning there is a cumlative combination of the 9th bit -1 as being the combination in 8 bits.
-Dos
So 255 is the answer, if you didn’t get what I was saying.
-Dos
No, there are 256 combinations, 0 through 255 (or 0×00 through 0xFF). 0 is a valid value.
So the answer is 256.
The difference btw = and == is :
in code if you type ,
a=5; /* means the value 5 will be assigned to 5 therfore = is an assignment */
/* operator*/
if(a==5) /* here == is used to compare , in otherwords == is used only to */
/* compare the values here 5 is not assigned to a , but it checks */
/* the value of a with 5 if true then proceeds with the loops*/
What is the code for reading “boot sector” in C ?