answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is the encoding technique called used to store negative numbers in the comouter's memory?

Negative integers are typically encoded using two's complement notation. That is, to convert the sign of any given integer, the bits are flipped (as per ones' complement) and 1 is added. Thus to convert the value +1 to -1 using 8-bit notation:

00000001 = 11111110 + 1 = 11111111

And reversing the process (-1 to +1):

11111111 = 00000000 + 1 = 00000001

In hexadecimal notation, the value 0x80 is the largest negative integer (-128) and 0x7F is the largest positive integer (+127). That is, 10000000 and 01111111 respectively.

Note that ones' complement was used in the past and while some systems still use it they are few and far between today. One of the problems with ones' complement is that +0 and -0 (00000000 and 11111111 respectively) would be treated as being two separate values, when the value 0 is neither positive nor negative. In twos complement, flipping the sign of zero becomes:

00000000 = 11111111 + 1 = 00000000

Note that the actual value is 100000000, but the most-significant bit (the overflow) is ignored because there can only be 8-bits in an 8-bit value. The same is true of 16-bit values, 24-bit values, etc. When all bits are filled with 1s, adding 1 wraps the value back to 0 again.

What is bare metal coding?

Bare metal coding a.k.a. coding or programming "on the metal" refers to writing computer programs in machine language, the only set of instructions that a CPU understands. Most would also include Assembly language in this category, as the resulting code runs natively (doesn't need to be compiled). All other computer languages must be translated by a compiler or interpreter into this native machine language.

What are the applications of matrices?

we can measure the expansion of the world by matrices cause in magnetic fields vectors can be streched up to a certain limit which are the eigen values.

Delphi is named after what goddess?

The Delphi programming language was named after the Oracle of Delphi, the common name for the Pythia, the priestess of the Temple of Apollo at Delphi in Greece. The Oracle database was a popular DBMS and, given that Delphi is based upon the Pascal programming language which focuses on database development, this tied in nicely with the phrase; "If you want to talk to the Oracle, go to Delphi."

Which amendment to the constitution is named after Susan B. Anthony?

okay i figured it out...its the 19th amandment! which gave women the right to vote. the 19th amendment is also known as the susan b Anthony amendment! thanks. you can Google the question and scroll down a little bit and it will tell you the same answer if you want to check and be sure

List four things a process control block holds?

A Process Control Block is a data structure in the operating system kernel containing the information needed to manage a particular process. In general a PCB will include:

  1. PID
  2. Process state ( Ready, Stop, etc. )
  3. Priority
  4. Parent ID
  5. Owner or user ID.
  6. Register values for the process including the program counter and stack pointer values for the process.
  7. The address space for the process.
  8. Process accounting information, such as when the process was last run, how much CPU time it has accumulated, etc.
  9. Pointer to the next PCB i.e. pointer to the PCB of the next process to run
  10. I/O Information (i.e. I/O devices allocated to this process, list of opened files, etc)

What is the best programming language to learn for jobs?

Best in what way? Best for the computer to learn? Well, that is determined by two things...the algorithm that the computer processor(s) run through to achieve the "machine learning", and the speed/efficiency of that algorithm - since it could be an algorithm that will work but perhaps will take so much time to arrive at a good result that it is ineffective in a practical sense.

Now, if you want to ask instead what is the best computer language in which to program algorithms...it is a controversial subject, but overall I would say programming it in a language that is translated well into the machine language which will be running the algorithm, since it must be the best that it can be -- for speed and efficiency. Then, the computer processor(s) speed is/are not hampered by the inefficiency of the choice of code generator or compiler/intrepreter (i.e., in general, the programming language).

However, I also suspect that you are asking from a personal point of view, namely, which language should you learn if you wanted to get into this machine learning field...I think majority of people working in the field like Prolog, Lisp, C++, and Java. Also, there are some people programming in Natural Language Programming (NLP) parsing and lexical analysis that prefer computer languages devoted specifically to NLP.

NLP and Machine Learning algorithms are often working hand in hand to sift through human language texts of all kinds to glean and summarize information and find relevant correlations that exist between all of the ideas and stories in those texts - some factual info, some opinions. Businesses like this stuff for data mining and finding patterns amongst people's likes and dislikes so that they can market to those preferences.

Also, many people like to discover correlations, for instance, that say when certain words are used in a financial article, the chances are that these certain types of stocks will rise in price. Thus data mining is a large reason for the popularity of machine learning.

NLP has been around for many years and is the effort behind what many people have sought -- to build a computer helper that they can talk with in a natural way - so much easier than all that typing and thinking of how to pose the question just so.

It is the next step in the evolution of an internet search engine -- one that learns the best answers and filters out all the extra stuff and does not present the "irrelevant".

My guess is that the programming language choice for machine learning algorithms will become less important than the design of the machine learning algorithms themselves. As time goes forward, the "programming" is being done with visual tools and automatic code generators, and implementing a design of a new machine learning learning algorithm is done with those high level tools where the designers don't necessarily know how it looks in the programming language or in the machine language.

An argument can be made that the "programmers" should know the efficiency of their designs of the machine learning algorithms on that hardware - but that is usually left to the people who are specifically designing the code generators - which is something far removed from the fun of designing the machine learning algorithms. Specialization is the nature of these fields. So, some designers will arrive on the scene that don't know anything about programming languages, they just know the algorithms of the specific domain and are constantly improving them using the Algorithm Studio software.

What are the main parts of processor with diagram?

THE PARTS OF THE MICROPROCESSOR ARE;

a) CORE

b) CODE CACHE

c) INSTRUCTION DECODER AND PREFETCH UNIT

d) BRANCH PREDICTOR

e) INTEGER ALU (arithmetic and logic unit)

f) REGISTERS

g) EXECUTION UNIT

h) 32-BIT BUSES

i) FLOATING POINT UNIT

j) DATA CACHE

k) PRIMARY CACHE

l) BUS INTERFACE

m) 64-BIT BUSES

Who is the founder of C programming language?

C was developed by Dennis Ritchie at AT &T's Bell Laboratories of USA in 1972.

What does product of a number mean?

There is no such thing as the product of just one number, a product is when 2 or more numbers are multiplied. The product of a number and another number means the answer you get when you multiply the two.

Why is COBOL a popular modern programming language used in business today?

COBOL is a business-oriented language that has a strong support for files, e.g., reading a file; performing any file operation is much simpler in COBOL than in other languages, such as C/C++. It has many built-in commands, e.g., edit-picture clause, redefines, rename facility, that are very useful for businesses.

What are object oriented Programs?

There are two types of programmes related to objects that i know.

Pradip: object base means : realted only with object where u can find the encapsulation ,abstraction data hiding is possible but Inheritance,polymorphism, wil not be possible in case of object base programme. all are core object oriented programming.

What is a RDBMS?

A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. Most popular databases currently in use are based on the relational database model.

A short definition of an RDBMS is: a DBMS in which data is stored in tables and the relationships among the data are also stored in tables. The data can be accessed or reassembled in many different ways without having to change the table forms...

- Sagar Verma

What was the use of octal and hexadecimal language in computer?

Octal (base 8) and hexadecimal (base 16) are simply shorthand notations for binary sequences. We can actually use any base that is a power of 2 (including base 4, base 32, base 64, and so on) as a shorthand for binary, but we use octal and hexadecimal because they are fairly easy to work with.

If we look at base 4 first, we can better understand the relationship between binary and all other bases that are a power of 2. Base 4 only uses 4 symbols, 0, 1, 2 and 3. In binary these would be represented by 00, 01, 10 and 11 respectively. Thus a single base 4 digit can be used in place of every two binary digits, essentially halving the length of any binary sequence.

Base 8 (octal) uses 8 symbols, 0, 1, 2, 3, 4, 5, 6 and 7. In binary that is 000, 001, 010, 011, 100, 101, 110 and 111. Thus a single octal digit can be used in place of every 3 binary digits, reducing the length of a binary sequence by two-thirds.

Similarly, base 16 (hexadecimal) uses 16 digits, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e and f, and each digit can represent 4 binary digits. By the same token a single base 32 digit represents 5 binary digits, while a single base 64 digit represents 6 binary digits, and so on.

Since octal notation splits a binary sequence into groups of three bits, it is ideal when the number of bits is a multiple of 3, such as in a 24-bit system. That is, a 24-bit sequence (with 24 digits), can be reduced to an octal sequence of just 8 digits.

And since hexadecimal notation splits a binary sequence into groups of 4 bits, it is ideal when the number of bits is a multiple of 4, such as in a 32-bit system. Again, a 32-bit sequence (with 32 digits) can be reduced to a hexadecimal sequence of just 8 digits.

We predominantly use hexadecimal as a shorthand notation for binary numbers because a byte is typically 8-bits long, thus we only need two hexadecimal digits to represent all possible values in a byte. A single hexadecimal digit therefore represents half a byte, which we affectionately call a nybble.

You may well ask why we don't just use decimal notation as a shorthand for binary sequences and save us humans all the hassle of translating altogether. After all, if computers can be programmed to translate hexadecimal and octal notation into their native binary, then surely they can also be programmed to do the same for decimal. In actual fact they can and do. But when presented with a long sequence of binary such as:

01111101010011010110010011110100

it's much easier to split the sequence into groups of 4 digits and assign a single hex digit to each than it is to work out what the decimal equivalent would be. In this case the binary number splits as follows:

0111 1101 0100 1101 0110 0100 1111 0100

Then we can assign each group its hexadecimal equivalent:

7 D 4 D 6 4 F 4

Thus the hexadecimal value is 7D4D64F4.

In decimal we would have to write the value 2,102,224,116 instead. While this is only 2 digits longer than the hexadecimal (if we remove the comma separators), it takes a lot longer to work it out (I cheated and used a calculator). Hexadecimal is not only a much simpler conversion (you can easily do it in your head), it also works in reverse to reveal the original binary value. Remember that we don't really care what the decimal value is -- all we're really interested in is the binary value and how we can notate it as quickly as possible using as few symbols as possible. And counting up to 16 is really not much more difficult than counting up to 10.

Although it can take a bit of practice getting used to hexadecimal notation, it quickly becomes second nature, and you'll soon be counting in all sorts of bases besides base 10. You already do, in fact. The 24-hour clock is intrinsically sexagesimal, so you've been marking time in base 60 all this time (pun intended) without even realising it. The only reason it is base 60 is because it is the lowest number that is evenly divisible by 2, 3, 4, 5 and 6. The ancient Sumerians knew this 5,000 years ago. It's also the reason why circles have exactly 360 degrees.

Use and importance of programming languages?

Answer If it weren't for computer languages where would we be today. Can you imagine writing a program as simply as writing a sentence instead of using computer language, it would be impossible. CD/delete means one thing, CD:/change direction and if the double dots aren't there the computer won't recognise the command. That's why so many people especially Computer Programmers spend years in Schools learning computer language so that the every day joe can't do their jobs.

Is it possible for your Alice program to have more than one instance in a class?

It is possible to have more than one instance of the same class, because the class is simply the blue print for the actual object.

What are the advantages and disadvantages of CUI character user interface?

A CUI (Console User Interface) is quicker and easier to make since it does not require all of the necessary initialization requirements that programs working in a windowed environment need.

Write a c program to print the sizes and ranges of different data types in c?

#include<stdio.h>

#include<conio.h>

void main()

{

float f1,*Ptr1,*Ptr2;

ptr1 = &fl;

ptr2 = (&fl+1);

printf("%u",(char *)ptr2-(char *)ptr1);

getch();

}

What is meant by drivers in computers?

Drivers provide an interface between low level hardware (mouse, keyboard, printer, etc.) and the application software that uses them. Drivers normally operate within the operating system kernel, which is a protected area of the system. Poorly written drivers can cause full system crashes more readily than regular applications, since they have access to very important and sometimes complex parts of the system. Many a blue screen of death have been wrongfully blamed in Microsoft, when a poorly written 3rd party driver was at fault.

If alana wants a career in the programming and software evelopment pathway is a potential job title?

A potential job title for Alana in the programming and software development pathway could be Software Engineer. This role involves designing, coding, testing, and maintaining software applications. Other possible titles include Web Developer, Mobile App Developer, or Software Developer, depending on her specific interests and skills in the field.

Give you 3 function of Presentation Program?

presentation software is software that helps you create & share presentations; gain powerful insights.

presentation software is software developed to give users a feel for the product , such as trail ware

What are inner classes?

Quite simply, an inner class is one class within another. Typically the inner class will be a private inner class, and will only be used by the outer class.

class MyOuterClass {

class MyInnerClass {

}

}

How do you swap 2 variables without using third variable?

void main() { int a,b; clrscr(); printf("\n\n\t\tenter any two nos..."); scanf("%d%d",&a,&b); a=a+b; b=a-b; a=a-b; printf("\n\n\t\tvalue of a=",a); printf("\n\n\t\tvalue of b=",b); getch(); }

What is mid level language?

A language that allows you to combine high-level programming with low-level programming. C and C++ are generally regarded as being mid-level languages.