What is floating point in computing?
Decimal Cases * * * () * () In programming, a floating point number is expressed as . In general, a floating-point number can be written as
where * M is the fraction mantissa or significand. * E is the exponent. * B is the base, in decimal case . Binary Cases As an example, a 32-bit word is used in MIPS computer to represent a floating-point number: 1 bit ..... 8 bits .............. 23 bits representing: * The implied base is 2 (not explicitly shown in the representation). * The exponent can be represented in signed 2's complement (but also see biased notation later). * The implied decimal point is between the exponent field E and the significand field M. * More bits in field E mean larger range of values representable. * More bits in field M mean higher precision. * Zero is represented by all bits equal to 0: Normalization To efficiently use the bits available for the significand, it is shifted to the left until all leading 0's disappear (as they make no contribution to the precision). The value can be kept unchanged by adjusting the exponent accordingly. Moreover, as the MSB of the significand is always 1, it does not need to be shown explicitly. The significand could be further shifted to the left by 1 bit to gain one more bit for precision. The first bit 1 before the decimal point is implicit. The actual value represented is
However, to avoid possible confusion, in the following the default normalization does not assume this implicit 1 unless otherwise specified. Zero is represented by all 0's and is not (and cannot be) normalized. Example: A binary number can be represented in 14-bit floating-point form in the following ways (1 sign bit, a 4-bit exponent field and a 9-bit significand field): * * * * * with an implied 1.0: By normalization, highest precision can be achieved. The bias depends on number of bits in the exponent field. If there are e bits in this field, the bias is , which lifts the representation (not the actual exponent) by half of the range to get rid of the negative parts represented by 2's complement. The range of actual exponents represented is still the same. With the biased exponent, the value represented by the notation is:
Note: * Zero exponent is represented by , the bias of the notation; * The range of exponents representable is from -126 to 127; * The exponent (with all zero significand) is reserved to represent infinities or not-a-number (NaN) which may occur when, e.g., a number is divided by zero; * The smallest exponent is reserved to represent denormalized numbers (smaller than which cannot be normalized) and zero, e.g., is represented by: Normalization: If the implied base is , the significand must be shifted multiple of q bits at a time so that the exponent can be correspondingly adjusted to keep the value unchanged. If at least one of the first q bits of the significand is 1, the representation is normalized. Obviously, the implied 1 can no longer be used. Examples: * Normalize . Note that the base is 4 (instead of 2)
Note that the significand has to be shifted to the left twobits at a time during normalization, because the smallest reduction of the exponent necessary to keep the value represented unchanged is 1, corresponding to dividing the value by 4. Similarly, if the implied base is , the significand has to be shifted 3 bits at a time. In general, if , normalization means to left shift the significand q bits at a time until there is at least one 1 in the highest q bits of the significand. Obviously the implied 1 can not be used. * Represent in biased notation with bits for exponent field. The bias is and implied base is 2.
The biased exponent is , and the notation is (without implied 1): or (with implied 1): * Find the value represented in this biased notation: The biased exponent is 17, the actual exponent is , the value is (without implied 1):
or (with implied 1):
Examples of IEEE 754: * -0.3125
The biased exponent is , * 1.0
The biased exponent is , * 37.5
The based exponent: , . * -78.25
The biased exponent: , * As the most negative exponent representable is -126, this value is a denorm which cannot be normalized: by GAURAV PANDEY & VIJAY MAHARA..........
AMRAPALI INSTITUTE...................
Can you say that the hackers are the good people and crackers are the bad people?
For all intents and purposes, there are indeed good and bad hackers when considering all the modern definitions of hackers, but the answer one would get to this question depends on whom you ask. In general, there are four categories of hackers. Each category attempts to generally convey the moral compass of that group relative to themselves and everyone else, as well as provide a basic backdrop of information on that category.
The first category of hackers are those for whom the term 'hacking' was originally defined. In this category, you have the hackers that perform the art in order to improve their knowledge of technology. They are curious about how systems work, and all of their attempts at penetration and exploits are merely expressions of this curiosity. Any damage caused is coincidental, or, if intentional, is based on revenge and not simple exploitation of innocent bystanders. Hackers were often classified by types, such as hardware hackers, computer hackers, phone hackers, etc.
In general, this category of hackers will not acknowledge the remaining three types of hackers as such. They consider the second form of hackers to be 'crackers', the third form as 'security consultants', and the fourth form as 'criminals.' This category only recognizes the classic definition of hacking, and so all hacking is good. Most everyone else, except possibly whitehats, are likely to see this category as bad due to the negative media coverage of crackers.
The second category of hackers were called crackers at large, until the media had a confusion over the various terms and simply lumped anyone that did something unusual with technology as hackers, mutating the term. Crackers are those that generally 'crack' things, such as breaking through firewalls, reverse engineering copyright protection so they can sell illegal copies, and the like; they have the same basic skills as hackers, but have a darker side to their motives.
Classic hackers generally hated the media for smearing their reputation by lumping in these malicious individuals with themselves. At some point, crackers also started using the term 'hackers' for themselves, thus further cementing the definition of hacker as 'one who does bad things with computers.' These crackers see themselves as good, or at least morally gray, and do not generally see any difference between their activities as compared to classic hackers, but are classified as bad by almost everyone else.
The third category of hackers are called whitehat hackers. Individuals in this category are a branch from the classic hackers on the 'good' side of morality. While classic hackers might say that this new group of hackers sold out on their heritage, whitehat hackers are out to make the world a better place, and line their pockets at the same time. Whitehats generally appeared after the appearance of blackhats; they seem to have appeared from the classic hacker community in response to a threat with the promise of monetary gain for their troubles.
These hackers will penetrate systems, document the flaws, and then sell this information to the organizations they have penetrated. They won't generally do so until they've been contracted by the organization to perform this work, which makes their otherwise illegal activities legal. They are essentially employed hackers for the good of humanity. Classic hackers are likely to see them as bad, having discarded their disdain for corporate greed, and blackhats see them as enemies, while the rest of the world see them as good.
The fourth category of hackers are called blackhat hackers, and represent the other side of the for-profit hacker community. They are generally crackers that have gone to the next level of the art of criminal activity. While crackers might break copyright protections for personal gain, blackhats are more interested in the big pot of gold at the end of the rainbow. Rather than sell a few lousy DVDs or cracked games, these hackers break into databases and steal millions of credit card numbers, or grab bank account numbers and transfer money out of them covertly, and other such activities.
Blackhats and whitehats are directly opposed to each other, with the good trying to defend companies against the bad. Neither group are generally interested in hackers or crackers, except possibly as recruits for their respective trades. Everyone considers this group bad, except for themselves; since most of them have little sense of morality, they usually simply exist, although some might acknowledge they are bad or have a sense of doing good by claiming that their hacker mentality against corporate greed drove them to relieve those corporations of their money. Blackhats, however, will work together for greater gains from their activities.
As one can tell, 'good' and 'bad' are relative to whom the question is asked, and even their very definitions differ even within the same group and from other groups.
Do compiled programs usually run faster because they are already in machine code?
No it is because compiled programs are scared so they run like stink.
Plus, uncompiled programs, ie. source programs, do not run at all... neither slowly nor fast.
How do you write a program to find out largest number between two numbers using ternary operators?
// assume you want the find the largest of ints a,b,c:
int max = (a>b&&a>c?a:b>c?b:c);
C program for Sum of n number using if else statements?
// Why do you need if/else statements?
int main()
{
int numbers[] = {1, 2, 3, 4, 5, 6}; // and so on
int i;
int sum = 0;
for(i = 0; i < sizeof (numbers)/sizeof(int); i++)
sum += i;
return sum;
}
What are non alphanumeric values?
!@#$%^&*() basically they are any characters that do not contain the value of a number or a letter.
AnswerIt is data formatting that includes non-standard ASCII characters (characters not included on a standard English-language keyboard)All characters besides:
0123456789
abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
and those letters with accents and diacritical marks
and those letters in other alphabet systems
Where does global variables stored in C?
It depends entirely on what platform you are using.
In an embedded environment, for instance
global/static variables go into different RAM memory segments depending on whether or not they are initialised.
constants are often left in ROM
automatic variables are normally placed of the stack of the currently running task but not always.
By definition, only a hacker can hack an account. Someone trying but not succeeding is a wannabe hacker. Anyone else accessing an account will do so through regular credentials (such as pin and password combinations), although those might have been acquired illegitimately.
What is a c programming course?
C Programming Course, C Training, Learn C Programming www.traininghott.com/Courses/ANSI-C-Programming-Hands-On-C-...Course Description: This hands on C programming course provides a comprehensive introduction to the ANSI C language, emphasizing portability and ... C Tutorial
How many communication satellites are currently orbiting the earth?
The numbers vary among estimates, but there are between 2100 to 2200 functioning artificial satellites in Earth orbit. Russia has the greatest number at around 1324. The U.S. is second with 658 satellites in orbit.
When the user loads a program it is copied into before it is run?
RAM
It depends on the computer system being used. Traditionally an executable program would be copied in its entirety from its storage media (disk, diskette, tape, SD card, USB device, network storage) into memory (also called RAM for Random Access Memory). If it already is in a high speed ROM (read only memory) it might be executed directly from there or it might still be copied into RAM for execution. It depends on the capabilities of the rest of the hardware.
Systems with a swapping area might copy the program to the swap area and flag it for execution. When its turn comes, part of it are loaded into memory as needed and run.
Other systems don't even do that. They can just flag the program location on the disk drive as ready run. When its turn arrives, the needed parts of the program are copied to memory and run.
Function Pointers are basically used when we want to select a function which is to be used dynamically at run time.
AnswerFunction pointers are the only way for "Interept programming". In UNIX all the Interepts are called using function pointers. This is mainly used in system programming. Answerits nothing but a pointer to function. which is similar to ptr to a variable, if we are saying ptr to a variable then it will hold address of the variable like that fn. ptr will have the address of the function..one of the major application of the function pointer is call back function.. i.e callback.
AnswerPointers to functions/methods/subroutines aka 'Delegates' are frequently used in .NET programming especially in EventHandling, MemberInvoking<><><>
A function pointer is used to pass a function as an argument to another function, or to store a function as a data item, for example a list of functions can be implemented as an array of pointers to functions. Function pointers are used to store interrupt handlers in tables.
What is plus operator is it unary or binary?
There is no unary plus in C, but if there were, it would have only one operand, unlike the binary plus which has two:
x = a + b; /* binary plus */
x = + b; /* unary plus -- not in C*/
x = a - b; /* unary plus */
x = - b; /* unary minus */
How to remove duplicate values in an array?
The simplest way of doing this is not very efficient, but provides a quick development time. You want to take all of the elements of the array, add them to a Set, then retrieve them as an array again. Note that this will probably not preserve the order of elements in the array.
{
Object[] originalArray; // let's pretend this contains the data that
// you want to delete duplicates from
Set newSet = new HashSet();
for (Object o : originalArray) {
newSet.add(o);
}
// originalArray is now equal to the array without duplicates
originalArray = newSet.toArray();
}
Now the efficient, and more correct, solution.
This one will create a new array of the correct size without duplicates.
{
Object[] originalArray; // again, pretend this contains our original data
// new temporary array to hold non-duplicate data
Object[] newArray = new Object[originalArray.length];
// current index in the new array (also the number of non-dup elements)
int currentIndex = 0;
// loop through the original array...
for (int i = 0; i < originalArray.length; ++i) {
// contains => true iff newArray contains originalArray[i]
boolean contains = false;
// search through newArray to see if it contains an element equal
// to the element in originalArray[i]
for(int j = 0; j <= currentIndex; ++j) {
// if the same element is found, don't add it to the new array
if(originalArray[i].equals(newArray[j])) {
contains = true;
break;
}
}
// if we didn't find a duplicate, add the new element to the new array
if(!contains) {
// note: you may want to use a copy constructor, or a .clone()
// here if the situation warrants more than a shallow copy
newArray[currentIndex] = originalArray[i];
++currentIndex;
}
}
// OPTIONAL
// resize newArray (using _newArray) so that we don't have any null references
String[] _newArray = new String[currentIndex];
for(int i = 0; i < currentIndex; ++i) {
_newArray[i] = newArray[i];
}
}
---------
The second version is correct in theory. However, if you deal with large two- or more- dimensional arrays, you are in trouble, as with each new element in the destination array you will have to search through a greater number of elements.
This is especially true if you look for duplicates in more than one element of the array, for example looking in columns 'a' and 'b' of array
a1 b1 c1 d1
a2 b2 c2 d2
a3 b3 c3 d3
Drop in performance is unbelievable if you go over approx 1,000 records with majority or records being unique.
I am trying to test a couple of different approaches for large arrays. If anyone is interested, let me know, and I will keep you posted.
How is image resolution expressed?
Image resolution is usually expressed by giving the dimensions of the image in pixels. The size of an image that is 640 pixels wide and 480 pixels tall would be expressed as 640x480. 640x480 is read as "six forty by four eighty".
In procedural programming the programs are written as a list of instructions (procedures) which are written in a sequence, and where all programming is textual. In contrast, visual programming language uses graphics, animations....to manipulat programs without using texts....VLP is much easier than PP.
Can you declare a function in the body of another function in c language?
yes, we can not declare a function in the body of another function. but if we declare a function in the body of another function then we can call that very function only in that particular function in which it is declared; and that declared function is not known to other functions present in your programme. So if a function is required in almost all functions of your programme so you must declare it outside the main function i.e in the beginning of your programme.
What are the object features of pascal programming language?
Unlike C++, Pascal is a "safe" language. While it is possible to write incorrect programs, they can't harm more than themselves; they can't get a pointer into some other concurrently executing program and start changing values over there.
If you're considering Pascal, take a long hard look at Python or Ruby first. They are modern safe languages, suitable for teaching, which enjoy better support on modern systems than Pascal. They are also freely available.
What are the fields of a node in a linked list?
usually we have two fields they are data field and node i.e. pointer field.it also depends on type of linked list.the above said is for single linked list.And for double linked list it sontains three fields first pointer that pointes to previious node and data field and another pointer that point to next node
Advantages of object-oriented approach over structured approach of problem solving?
The object-oriented approach has the following advantages: when the expert system is large, complexity is reduced through modularization, that is, by subdividing the system into manageable size components, such as objects, and establishing well-defined relationships between them. The internal design of each object is localised so that it does not depend on the internal design of another component. The design concepts are separated from the implementation details.
That means that rules are developed separately from the objects that they manipulate. Objects can be reused. They are written and debugged once, and then matched to form new applications.
The advantage of separation of the various components is that each of these is autonomous. What should be well-managed are the relationships between them. Unlike the other systems that implement a rule-based system as a library in object-oriented language, this architecture extends this further by applying object technologies
to every single component of the expert system, including the rule base.
In which Language is Linux written?
Linux supports any written language: it understands Unicode natively, so it can display the characters of any language with the appropriate locales included.
As far as programming languages, Linux is written in C, but almost any language, from assembly to C to C++ to Python to Perl to .NET can be used on it.
What command is used to exit from the middle of a loop in Scilab?
As in most languages, a break statement is used to exit the nearest enclosing scope, including loops:
// Scilab example:
// Loop 5 times with a 50% chance of early termination on each iteration
for i=1:5
disp (i)
if rand (1,1)>0.5 then
break
end
end
// break jumps to this point
Do real time processingsystem process data instantly?
The advantages are; if you have a processor that can handle all the stress and load of using the processes as they are called up in real time then it works faster.
Disadvantages; puts a helluva lot of stress on your processor and if you have too many programs running without the necessary speed then your processor will overheat and might start to melt.