It's obviously the first...no wait, it's the third...or is it the second...my psychic abilities seem to be failing me again, perhaps if you give the "following" memory dump options someone will be possibly be able to help.
List two advantages and two disadvantages of having international standards for network protocols?
Advantages: We have a standard to work on i.e we know that another person working on it wil follow what we do. Secondly as it becomes widely used, the effective usage increases...it becomes easy for people to make applications that use such protocols. Disadvantages: Often standards made tend to limit themselves in a way or the other. Once made it's difficut to change a standard when we have better methods found.
How do you handle a binary overflow?
When adding two signed integrals (x and y) of the same type, the result cannot overflow when they have opposing signs. The result can only be x or y or somewhere in between, and all values in the range x to y are valid regardless of which is the larger. But when they have the same sign, there is a potential for overflow. Given that x + y = z has well-defined behaviour, we can perform the following pseudocode operations to test for an overflow in z:
if x=0 or y=0 then overflow:=false
else if x<0 and y>0 then overflow:=false
else if x>0 and y<0 then overflow:=false
else if x<0 and z>0 then overflow:=true
else if x>0 and z<0 then overflow:=true
else overflow:=false
The following example shows how we can implement this in C:
// Returns true if x + y = z overflows
bool int_sum_overflow (int x, int y, int z) {
if (!x !y (x<0 && y>0) (x>0 && y<0)) return false; return (x<0 && z>0) (x>0 && z<0);
}
When dealing with unsigned integrals, we must test the operation before we perform the operation. This is because overflowing an unsigned integral has undefined behaviour in much the same way that division by zero has undefined behaviour. If we perform the operation first and an overflow occurs, then it's already too late; undefined behaviour has unpredictable consequences. If we're lucky, our program will simply crash and no harm will be done. If not, we have no way of knowing what has happened. Even if our specific implementation provides well-defined behaviour, it cannot be guaranteed across all architectures and cannot be regarded as being portable. Where undefined behaviour is concerned, prevention is always better than cure.
Fortunately, x + y = z is relatively simple to test without the need to evaluate z first. Given that z cannot exceed the maximum unsigned integral without overflowing, it follows that if max - x were less than y then the result will overflow. This can be stated as follows:
if (max-x)<y then overflow:=true
else overflow:=false
Given that max is a well-defined constant, this is trivial to implement. The following example shows how we might implement this in C:
#include<limits.h> // for UINT_MAX
// Returns true if the sum of x and y would overflow:
bool uint_sum_overflow (unsigned x, unsigned y) {
return (UINT_MAX - x) < y;
}
The above examples deal with addition only but we can perform similar tests for subtraction and multiplication operations. Aside from divide by zero, integral division operations present no major problems, although most divisions will result in a truncation of any fractional component.
If we want to improve efficiency then we really have to lift the bonnet and use assembly programming. In the case of unsigned integral addition, we need to test the carry bit in the most significant bit-adder. For signed integrals we need to test both carry out and the carry in bits of the most-significant bit-adder.
What is a supervisor call interrupt?
SVC (supervisor-call): A request from the user-program to the kernel (or supervisor), to do something like open a file, allocate memory, create a new process etc.
In x86 platform SVCs are executed via "INT nn" machine instruction, that's what Intel calls 'software interrupt'.
These are memory locations to store a vast amount of data. Usually a limited no. of variables are handled while programming in GW Basic. Sometimes you need to bother a plenty of variables and this colud make programming tiresome. To save yourself from a lot of manual inputs, Arrays can help you.
Difference between deterministic finite automata and non deterministic finite automata?
A deterministic finite automaton will have a single possible output for a given input. The answer is deterministic because you can always tell what the output will be.
A nondeterministic finite automaton will have at least one input which will cause a "choice" to be made during a state transition. Unlike a DFA, one input can cause multiple outputs for a given NFA.
I dont know how to generate the nos. randomly.I think it should follow some logic.So the following prog is made upon the inputs given by a user.
#include
#include
void main()
{ int a[5][5],i,j,s;
printf("\nEnter elements of the 5X5 matrics:\n");
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
{ scanf("%d",&a[i][j]);
if(a[i][j]<0 a[i][j]>100)
{ printf("\nThe no. should be between 1 & 100\nEnter Again:");
scanf("%d",&a[i][j]);
}
}
}
printf("\nThe given matrix is:\n");
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
printf("%d",a[i][j]);
printtf("\n");
}
printf("\nThe sum of each row:");
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
s+=a[i][j];
printf("%d->%d\n",i+1,s);
}
getch();
}
Hope this would help you.
What is a supermarket checkout system?
All these processes are very helpful for the purposes of dealing with an individual customer's purchases. However, when computers are linked in a network, many new uses are possible.
Now, I am going to draw a different system boundary. The components of this supermarket checkout system are the checkout terminal, the network and the database server. A database server is used to make the data in databases available to other computers on the network, and therefore to users. You met a specialised form of database server in Section 14.2: the FirstClass server. In the following sections, I'll focus on the network first and then look at the database server.
You might be wondering about the users of the system: the customer and the checkout operator. For the time being, we are focusing on the computers and network, rather than thinking about the end users.
To count the no of digits in an integer?
Say you have some integer a. a
First take it's absolute value. |a|
Next log it base 10. log10 |a|
Truncate this value, then add 1. trunc ( log10 |a| ) + 1
You now have the number of digits.
What are the 4 basic things a CPU does with 2 pieces of info?
There are way more than 4 things - and even "basic" things - a computer can do with two pieces of information. For example, add, subtract, multiply, divide, get the remainder of a division (modulos), compare, boolean AND, boolean OR, boolean XOR, exchange the two values.
There are four "main" types of text alignment.
What are the main advantages and disadvantages of using a layered network architecture?
The following are the advantages of a layered architecture:
Layered architecture increases flexibility, maintainability, and scalability. In a Layered architecture we separate the user interface from the business logic, and the business logic from the data access logic. Separation of concerns among these logical layers and components is easily achieved with the help of layered architecture.
Multiple applications can reuse the components. For example if we want a windows user interface rather than a web browser interface, this can be done in an easy and fast way by just replacing the UI component. All the other components like business logic, data access and the database remains the same. Layered architecture allows to swap and reuse components at will.
Layered architecture enables teams to work on different parts of the application parallely with minimal dependencies on other teams.
Layered architecture enables develop loosely coupled systems.
Different components of the application can be independently deployed, maintained, and updated, on different time schedules.
Layered architecture also makes it possible to configure different levels of security to different components deployed on different boxes. sO Layered architecture, enables you to secure portions of the application behind the firewall and make other components accessible from the Internet.
Layered architecture also helps you to test the components independently of each other.
The following are the disadvantages of a layered architecture:
There might be a negative impact on the performance as we have the extra overhead of passing through layers instead of calling a component directly.
Development of user-intensive applications can sometime take longer if the layering prevents the use of user interface components that directly interact with the database.
The use of layers helps to control and encapsulate the complexity of large applications, but adds complexity to simple applications.
Changes to lower level interfaces tend to percolate to higher levels, especially if the relaxed layered approach is used.
A group of half a byte (4 bits) is referred to as a nibble.
I would suggest you start with a visit to your home county community college. They are typically more community oriented, and open to prospective students in your type of situation. You can request to speak to an enrollment specialist in the Admissions Office who will be able to guide and direct you. The community college - to start with - is also less expensive, smaller class size, and better student to professor ratio. This means more individualized attention. Today, colleges are a mixed bag in terms of ages with many individuals - because of the job market - changing careers. You should fair well there.
Are general purpose computers used mostly to control something else?
No.
It is possible to program them for that purpose, but they have many more uses that have nothing to do with control.
Is it true or false that modern OSs are interrupt driven?
Modern OSs making use of multi-tasking tend to be interrupt-driven.