answersLogoWhite

0

Computers do not understand decimal notation. All information (both instructions and data) must be converted to a binary representation before the machine can understand it. We use the symbols 0 and 1 (binary notation) but the machine has a variety of physical representations it can use to encode binary data, including transistors, flux transitions, on/off switches and so on.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Engineering

What is the difference between decimal and binary odometer?

ticking over and getting a new no. like do the clock or some type of speedometer...


What is the binary code used for?

binary code(computer science) A code in which each allowable position has one of two possible states, commonly 0 and 1; the binary number system is one of many binary codes.Source: http://www.answers.com/binary+code?cat=technology


How do you make binary to decimal converter in G W BASIC?

First of all we will talk about how binary number are converted back into decimal representation and later we will have program.Here is the formula of this transformation:Binary number: a3a2a1a0Decimal number a x 23 + a x 22 + a x 21 + a x 20Example:Binary: 1101Decimal: 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20 = 8 + 4 + 0 + 1 = 13And here we have our program:#include #include #include int main() {char str[100];int ind;int sum = 0;printf("Please enter binary number: ");scanf("%s", str);for(ind = 0; ind < strlen(str); ind++) {sum += (str[ind] - 0x30) * pow(2, strlen(str) - ind - 1);}printf("Number in decimal would be %d\n", sum);return 0;}Testing:Please enter binary number: 1101Number in decimal would be 13Please enter binary number: 10000001Number in decimal would be 129Please enter binary number: 11111111Number in decimal would be 255Please enter binary number: 0Number in decimal would be 0


What is number system what are various number system explain with a suitable example?

A number system is simply a way to record numbers. Humans have used a variety of numbering systems over the years, but the decimal system is by far the most prevalent today. This system uses the ten Arabic symbols, 0123456789, to represent the digits from zero to nine, and is known as base 10 for this reason. Digits are aligned on columns, with units on the right, 10s to their left, and 100's to their left, and so on. Each column is therefore 10 times the value of the column to its right. In other words, each column is an increasing power of 10, beginning with 10^0 on the right, then 10^1 and so on. You are undoubtedly familiar with base 10, however the above is relevant when discussing other number systems as the same principals apply. Computers use base 2 (binary), which is the lowest base of all. It uses the 2 Arabic digits, 0 and 1. Since it is base 2, the columns represent powers of 2. So the rightmost column represents 2^0, then 2^1, 2^2, 2^3, and so on the further left we go. So the number 4 in decimal would be represented by 100 in base 2. That is, 1 * (2^2), which is 4 (all other columns are zero, so they evaluate to zero). Computer programmers use base 16 (hexadecimal). This is because binary numbers, despite their apparent simplicity, are incredibly difficult for humans to work with. One digit out of place could be disastrous. Converting them to decimal is clearly an option, but hexadecimal is a lot simpler to work with because base 2 and base 16 are interchangeable and align with each other more closely than decimal. Four binary digits gives us 16 possible combinations. 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111 (decimal zero to decimal 15, respectively). With only 16 combinations to consider, each of these can be represented by a single hexadecimal symbol. There are only 10 Arabic symbols for numbers, so we must use 6 additional symbols for the numbers 10 to 15. By convention we use the letters a through f. Thus each of the binary combinations above can be represented by 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e and f, respectively. Binary digits (bits) are usually combined into groups of 8 bits, known as bytes. 8 is a multiple of 4, so we need 2 hexadecimal digits to represent a full byte. To do this we simply divide the byte into two half bytes (known as nybbles), then convert each nybble to its hexadecimal form. Thus the byte 01101101 is represented as nybbles 0110 and 1101, which is 5d in hexadecimal (often denoted as 0x5d). This equates to (5 * (16^1)) + (13 * (16^0)), which is 93 decimal. So 01101101 is binary for 93 decimal, or 0x5d hexadecimal. Regardless of the length of a sequence of bits, breaking them into groups of 4 allows them to be translated directly into hexadecimal. So a 32-bit number requires 8 hexadecimal digits. Reading and writing 8 digits is clearly a lot simpler than deciphering 32 bits of 1s and 0s, and because binary and hexadecimal have a consistent alignment (4 bits equals 1 hex digit), they are much easier to deal with than decimal which has a more variable alignment with binary (4 bits could be 1 or 2 decimal digits). Other bases that are in common use today include base 60, which is the basis for our clocks. 60 seconds is 1 minute and 60 minutes is 1 hour. Then we switch to base 12 for the hours (or base 24 if using a 24-hour clock). You may ask why we never "decimalised" our time-keeping (dividing the day into 10 or 20 longer hours, each with 100 minutes, each with 100 seconds, for instance). The main reason is that 60 is evenly divisible by 2, 3, 4, 5 and 6, whereas 100 is evenly divisible by just 2, 4 and 5, and a 12-hour period (which is also division of 60) is evenly divisible by 2, 3, 4 and 6 whereas 10 is evenly divisible by just 2 and 5. Inches and feet are also base 12. So while we are quite familiar with base 10, we actually use other bases without realising it. Of course we don't symbolise numbers greater than 9 with letters like we do in hexadecimal, but the principal is the same.


Are binary strings used in Java?

No if there was then java wouldn't have over 4 billion down loads

Related Questions

What are the advantages and disadvantages of binary code decimal?

Advantage of binary over decimal: information can be recorded and stored in any dichotomous variable: magnetised or not magnetised (most electronic media), pit or no pit (optoelectronic media CDs/DVDs). For decimal it would be necessary to store as 10 different levels of magnetisation or depths of pits. Not so easy to make such a system error-free. Advantage of decimal over binary: fewer "digits" required. Every ten binary digits (1024 values) can be replaced by just a shade more than three decimal digits (1000 values). So the number of digits to be stored is less than a third.


Why do people use decimal instead of binary?

We have ten fingers (including thumbs) and early counting is based on one-to-one mapping onto these digits. So one reason is simple familiarity. The other advantage of counting in decimals is that fewer digits are required: 4 decimal digits takes you to over a thousand, you would need 10 binary digits to go over 1024. It gets worse with larger numbers: 7 decimal digits to go over a million but 20 binary digit. I have phones with 11 digit numbers (without the international country code). In binary, that would be a 33-digit number. No thanks!


What happens to binary numbers over 255?

You simply use more binary digits.


What benefit does the binary digit have over decimal in ters of the internal operation of computer?

Binary is easier for the computer to understand. It is also easier to handle and is not costly.


Advantages of binary over decimal you?

The addition and multiplication table is much simpler. Also, on a computer it is easier to distinguish two different states than ten different states. For these reasons, modern computers do most of their calculations internally in binary.


What are the advantages of binary digit over decimal digits in computer operation?

It is relatively easy to code things in terms of on-and-off or magnetised-and-not (magnetic storage), or pit-or-no-pit (CDs). Coding in terms of 10 levels of magnetisation or ten depths of pits is much more difficiult and prone to error - both in writing and reading.


What is barnotion?

The line over the digits that repeat in a repeating decimal.


What is 75.25 percent as a decimal?

0.7525. All you have to do when turning a percent into a decimal is move over the decimal two digits to the left.


When 107 over 333 is written as a decimal how many digits are in the smallest sequence of repeating digits?

When 107 over 333 is expressed as a decimal, it becomes approximately 0.321321321..., which reveals a repeating sequence. The repeating part, &quot;321,&quot; consists of three digits. Therefore, the smallest sequence of repeating digits has 3 digits.


In repeating decimals the line or bar placed over a repeating decimal?

It is placed over one length of repeating decimal digits.


What is 16 over 42 as a decimal?

0.380952380952The bolded digits repeat


How is a decimal a rational number?

A decimal is a rational number if:* It terminates - i.e., it has a finite number of decimal digits. * It doesn't terminate, but it repeats the same pattern over and over - possibly after a finite number of digits that are not included in the pattern. For example, 0.145145145145..., or 3.125252525...