Answer:
1. Processor communication -- this involves the following tasks:
<em>a. exchange of data between processor and I/O module</em>
<em>b. command decoding - I/O module accepts commands sent from the processor. E.g., the I/O module for a disk drive may accept the following commands from the processor: READ SECTOR, WRITE SECTOR, SEEK track, etc. </em>
<em>c. status reporting – The device must be able to report its status to the processor, e.g., disk drive busy, ready etc. Status reporting may also involve reporting various errors. </em>
<em>d. Address recognition – Each I/O device has a unique address and the I/O module must recognize this address. </em>
<em />
2. Device communication – The I/O module must be able to perform device communication such as status reporting.
3. Control & timing – The I/O module must be able to co-ordinate the flow of data between the internal resources (such as processor, memory) and external devices.
4. Data buffering – This is necessary as there is a speed mismatch between speed of data transfer between processor and memory and external devices. Data coming from the main memory are sent to an I/O module in a rapid burst. The data is buffered in the I/O module and then sent to the peripheral device at its rate.
5. Error detection – The I/O module must also be able to detect errors and report them to the processor. These errors may be mechanical errors (such as paper jam in a printer), or changes in the bit pattern of transmitted data. A common way of detecting such errors is by using parity bits.
Answer:
import java.io.*;
public class Larger {
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));// reading input from buffered reader
int a,max=-99999,i;
for(i=1;i<=5;i++)
{
a=Integer.parseInt(br.readLine());//converting string input string to int
if(a >max)
max=a;
}
System.out.println("Maximum value : "+max);
}
Explanation:
Answer:
Network topology is the arrangement of the elements (links, nodes, etc.) of a communication network. Network topology can be used to define or describe the arrangement of various types of telecommunication networks, including command and control radio networks, industrial field busses and computer networks.
B. Because major shifts in thinking can cause change.
Answer:
showProduct(int,double)
for example: showProduct(10,10.5) is the correct answer even showProduct(10,10.0) is also correct but showProduct(10.0,10.5) or showProduct(10,10) or showProduct(10.0,10) are wrong calls.
Explanation:
The code is
- <em>public static void showProduct (int num1, double num2){</em>
- <em> int product;</em>
- <em> product = num1*(int)num2;</em>
- <em> System.out.println("The product is "+product);</em>
- <em> }</em>
showProduct is function which asks for two arguments whenever it is called, first one is integer and second one is of type double which is nothing but decimal point numbers. Generally, in programming languages, 10 is treated as integer but 10.0 is treated as decimal point number, but in real life they are same.
If showProduct( 10,10.0) is called the output will be 'The product is 100'.
Strange fact is that, if you enter showProduct(10,10.5) the output will remain same as 'The product is 100'. This happens because in the 3rd line of code,which is <em>product=num1*(int)num2</em>, (int) is placed before num2 which makes num2 as of type integer, which means whatever the value of num2 two is given, numbers after decimal is erased and only the integer part is used there.
This is necessary in JAVA and many other programming languages as you <u>cannot</u><u> multiply two different datatypes</u> (here one is int and another is double). Either both of them should be of type int or both should be of type double.