What formula determines the decimal value for each bit position in an octet?
The same as we use in decimal, except instead of powers of 10 it's powers of 2. Working from the least-significant bit (from right to left), each bit is worth:
2^0 = 1
2^1 = 2
2^2 = 4
2^3 = 8
2^4 = 16
2^5 = 32
2^6 = 64
2^7 = 128
So if the octet is 10110101, then working from right to left we get:
1*1 = 1
0*2 = 0
1*4 = 4
0*8 = 0
1*16 = 16
1*32 = 32
0*64 = 0
1*128 = 128
If we add these values up we get 181. Thus 10110101 is the binary equivalent of 181 decimal.
A part of this question requires re-translating into readable English.
The "size" of a page is 1 Kb. The size of a frame equals the size of a page, so a frame is also 1 Kb. There are to be 64 frames in 8 pages, which would mean 8 frames per page, except that one frame also equals one page?... This is illogical, unless you clarify your definition.
Comparison of all algorithms in data structures?
Arrays are datastructures which use continguous memory , and data allocation happens at compilation, so it is faster in execution . similarly in stacks and queue. The memory usage is lesser compared to other data type as it does not require pointers. It is fixed memory allocation so cannot be used until u are sure about the size of the data. Moreover if u do a wrong estimation about the size of data required then can lead to memory shortage or if declared more then it leads to Memory wastage.Searching can be easy in arrays,stacks and queues,however insertion and deletion is quite difficult in these data structures. Searching can also be easy in binary trees as data is sorted and stored . Accessing data is faster here as it allows random access to data.In arrays u can use only one type of data.
Linked list, graphs, trees are non continguous memory ,i.e they use heap memory. Here data is allocated in run time so execution may take more time compared to above, As data is allocated in run time u will also need memory allocator to keep track of available memory and allocate them. Memory usage is also more as we each node has to have the additional info about the address of the next data.so its time consuming compared to above. As the size of data is not fixed can be used in programs where we are not aware of size of data before execution. Here data is sequencially accessed which means accessing data is slow .to access 30th element u will have to traverse through 30 elements. However data insertion and deletion is faster all that we need to do is change address of the pointer. There is no memory wastage here as memory is not stored for this but its more flexible. Here u can store different data types unlike arrays. -
Shruthi.B.O
Who side was chelmsford on roundheads or cavalier?
Chelmsford is a town in both England and Massachusetts USA.
-Towns did not take sides in the English Civil War, This was essentially a war between Royalty and the Parliament of England.
How do you open a program file in foxpro?
You may open dbf file due to dBase, Clipper or FoxPro applications Another case make use tool below at some opening troubles
How do you write a program in C using the fprint and fscan functions?
By using those two functions in your code.
What is an exception With an example program explain how it is handled?
An exception is literally that: an exception. Exceptions are thrown when something that shouldn't happen does. For example, if you're trying to turn "Hi" into an Integer, you'll get a NumberFormatException (in Java.) If there is nothing in place to handle an exception, the program will crash. Try-catch blocks are used for exception handling within methods, and exception throwing is used to give out exceptions, or let a different method handle it.
Example program (Java):
class ex{
public static void main(String[] args){
String Strx = "5a";
int x = 0;
try{
x += Integer.parseInt(Strx);
}catch(NumberFormatException e){ // If Strx is not an Integer
x += Integer.parseInt("5");
}
System.out.println("The value of x is " + x); // The value of x is 5
}
}
Alternatively, you could remove the try-catch blocks, and simply write "public static void main(String[] args) throws NumberFormatException" in the 2nd line of the program.
How is your hardware your physical interface?
Hardware are all the components that physically make up your computer; a keyboard, mouse, monitor, printer, and so on are all physical devices that you can touch and interact with. Software and data, in contrast, are logical and cannot be physically interacted with. While software is stored in a physical medium, it cannot be directly interacted with, because it only exists as a state within the hardware. Manipulation of software and data occurs through the physical interface, the hardware.
What is a type error in Python and what am I doing wrong?
It means you are trying to perform an operation with an incompatible type. Without knowing what code caused the error it's impossible to give an explicit answer, however a typical example of a type error is that you've attempted to perform an arithmetic operation upon a non-numeric value such as a string. E.g., "hello world" * 42 makes no sense in the real world because "hello world" is a non-numeric value and is therefore incompatible with the multiply operator.
Type errors are common when working with unchecked input. That is, you expect the user to enter a number but they enter a letter instead. If you don't test for this, errors are the inevitable consequence.
When would a wired network be more appropriate for home use than wireless?
A wired network would be more appropriate for home use than wireless if the user intends to use a desktop. If the purpose for the Internet connection is only to use it on the desktop or one particular place and not in any part of the house, then wired network will be better. And if there is only going to be one or two users not a number of users, wired network will be better.
What is the purpose of a list search?
The purpose is to find one or more items within a list.
Please clarify if this isn't what you were meaning to ask.
Why might a program that is known not to work continue to receive support?
There is no valid reason to support a program that does not work.
Infranet refers to the proposed system transferring sensitive data masquerading as anodyne data over the internet. It also is protective architecture for the internet and packet based telecommunication networks.
Can you declare constructor as constant if yes why?
Constructors are implicitly constant members of a class. They do not modify objects, rather they initialize them. So constant and not constant objects can invoke them:
const MyClass object; // invokes MyClass::MyClass() constructor
storage classes determines the part of memory where storage is allocated for an object. a scope specifies the part of the program which a variable name is visible, that is accessibility of the variable by its name. in c language there are four storage classes automatic, external, register, static.
What two words can be used instead of vegetation?
A two word synonym for vegetation is plant life. Other synonyms for the word vegetation include flora, greenery, herbage, and growth.
What is the Difference between program and flowchart?
Flowchart it is diagrammatic
Program it is coding.
A flowchart is drawn out on paper, and shows the logic of an if/then/else statement.
The programming actually is the if/then/else, not just the logic.
Why do you declare a string as char asterisk?
Declaring strings as char* is generally faster than declaring an array of type char.
Consider the following:
#include<stdio.h>
int main (void) {
char c1[12] = "Hello world";
char c2[] = "Hello world";
char* c3 = "Hello world";
// ...
return 0;
}
The string literal, "Hello world" is duplicated three times in the source code but in the resultant machine code that string only appears once (in the data segment). This is known as string-pooling; it makes no sense to maintain separate copies of the exact same value in the data segment.
Given that there is only one copy of the string, it would be natural to assume that c1, c2 and c3 all refer to the same memory location but they don't. In fact, the only one that does refer to the data segment copy is the third one.
If we examine the assembly for the c1 initialisation we find the following:
mov eax, DWORD PTR ??_C@_0M@KIBDPGDE@Hello?5world?$AA@
mov DWORD PTR _c1$[ebp], eax
mov ecx, DWORD PTR ??_C@_0M@KIBDPGDE@Hello?5world?$AA@+4
mov DWORD PTR _c1$[ebp+4], ecx
mov edx, DWORD PTR ??_C@_0M@KIBDPGDE@Hello?5world?$AA@+8
mov DWORD PTR _c1$[ebp+8], edx
The symbol ??_C@_0M@KIBDPGDE@Hello?5world?$AA@ identifies the string in the data segment but the assembly clearly shows data is being copied (moved) to a new location 32-bits (4 bytes) at a time. The new location is the address of c1. The same thing happens for c2, making yet another copy of the string.
However the c3 initialisation consists of just one instruction.
mov DWORD PTR _c3$[ebp], OFFSET ??_C@_0M@KIBDPGDE@Hello?5world?$AA@
The difference is that instead of copying the string to new memory, we simply copy the address of the string.
This is low-level stuff of course, but it makes no sense to copy objects from the data segment or indeed anywhere else when we can simply refer to them directly using a pointer. We only need to copy objects when we actually intend to make some change to the object without affecting the original object. In all other cases we can simply refer to them.
How do you run a rexx program through JCL?
This is the simplest form: no files are allocated for EXECIO.
All REXX features are available.
All REXX functions are available, including EXECIO.
All TSO commands are available,
for example: DELETE, LISTCAT, HRECALL, HDELETE.
ISPF features are not available,
for example VGET, File Tailoring. //* job statement //TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200 //SYSEXEC DD DSN=userid.REXX.EXEC,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * PROFILE PREFIX(userid) /* please use this,*/ /* specifying your userid*/ %MYREXX
Same as the previous, but two files are allocated for EXECIO
The program uses EXECIO.
It reads the file defined by //INFILE
it writes to the file defined by //OUTFILE
Do not use an ALLOC command for these files in the REXX program! //* job statement for invoking rexx by jcl //* good example of TSO in Batch //* how to run a rexx program with job control language //TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200 //SYSEXEC DD DSN=userid.REXX.EXEC,DISP=SHR REXX program library //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //INFILE DD DSN=userid.MY.INPUT,DISP=SHR //OUTFILE DD SYSOUT=* //SYSTSIN DD * PROFILE PREFIX(userid) /* please use this,*/ /* specifying your userid*/ %MYREXX