Computer Programming

Math and Arithmetic

Algebra

Numbers

# Which one is equivalent to multiplying by 2Left shifting a number by 1 or Left shifting an unsigned int or char by 1?

## Answer

###### Wiki User

###### 05/16/2008

The second.

## Related Questions

###### Asked in Computer Programming, Math and Arithmetic

### What is the effect of shifting an unsigned number in a register two bits to the right?

The number is divided by 4.

Read More

###### Asked in Math and Arithmetic

### Explain why shifting the decimal point in a number is equivalent to multiplying or dividing a number by a power of ten?

Because the decimal system is based on 10 ("decem" = 10 )

Read More

###### Asked in Math and Arithmetic

### What is the result of using a whole number in a multiplication three times?

It is equivalent to multiplying by the cube of that number.

Read More

###### Asked in Math and Arithmetic, Algebra

### Why is x3 equivalent to x over three square?

Because if you are multiplying a number, x, three times it is
the formula of multiplying a cube!
...

Read More

###### Asked in Percentages, Fractions, and Decimal Values

### How do you find an equivalent fraction by multiplying?

Multiply the numerator and the denominator by the same
number.

Read More

###### Asked in Algebra, Numbers

### Why does multiplying give you an equivalent fraction?

it is the Same Number Just 2,3,4.... Times As Much

Read More

###### Asked in Math and Arithmetic

### Is 0.8 the same as 80 percent?

As a fraction of 1, yes. Multiplying a number by this fraction
will be equivalent to 80% of that number.
...

Read More

###### Asked in C++ Programming

### What is the c plus plus program to print armstrong numbers from 1 to 100?

#include<iostream>
#include<vector>
unsigned count_digits (unsigned num, const unsigned base=10)
{
unsigned count=1;
while (num/=base) ++count;
return count;
}
class number
{
std::vector<unsigned> value;
unsigned base;
public:
number (const unsigned _value, const unsigned _base=10): value
{}, base {_base} { *this = _value; }
number& operator= (const unsigned _value);
operator unsigned () const;
bool is_narcissistic () const;
};
number& number::operator= (unsigned _value)
{
unsigned count = count_digits (_value, base);
value.resize (count);
while (count)
{
value[value.size()-count--] = _value%base;
_value/=base;
}
return *this;
}
number::operator unsigned () const
{
unsigned num = 0;
for (unsigned index=0; index<value.size(); ++index)
num += value[index]*static_cast<unsigned>(std::pow (base,
index));
return num;
}
bool number::is_narcissistic () const
{
unsigned num = 0;
for (unsigned index=0; index<value.size(); ++index)
num...

Read More

###### Asked in C Programming, Algebra, C++ Programming

### How do you find the factorial using while loop in c plus plus?

unsigned __int64 factorial(unsigned __int64 number)
{
unsigned __int64 factorial=1;
while(number)
factorial*=number--;
return(factorial);
}
...

Read More

###### Asked in Math and Arithmetic, PHP Programming, Prime Numbers, The Difference Between

### Difference between signed number from unsigned number?

a signed number is one that can be negative (have a sign)
whereas an unsigned number will only be positive. due to less
information, you can double the largest number storable in a signed
integer to get the data available in an unsigned integer. However,
PHP doesn't have unsigned integers, they're all signed.
...

Read More

###### Asked in Math and Arithmetic

### What are two equivalent fractions for three ninths?

6/18 and 9/27......you can find out equivalent fractions by
multiplying the numerator (top number) by the same number as the
denominator (bottom number)
...

Read More

###### Asked in Math and Arithmetic, Algebra

### How the multiplication could be reduced to addition doubling halving?

Doubling a number means multiplying it by 2. This is equivalent
to adding the number to itself. Halving means dividing by 2. This
is equivalent to multiplying by 1/2 (or by 0.5); since this is not
an integer, it can't be reduced to addition.
...

Read More

###### Asked in Math and Arithmetic, Algebra

### How you could use doubling to find the product 13 X 4?

Doubling a number is equivalent to multiplying by 2.
Doubling twice (doubling, and then doubling the result again) is
equivalent to multiplying by 4.
(Also, doubling three times is the same as multiplying by 8,
doubling 4 times is the same as multiplying by 16, etc.)
...

Read More

###### Asked in Java Programming, C Programming, C++ Programming

### What is a program that calculates the sum of any 5 digit integer number entered by user?

#include<iostream>
unsigned sum_of_digits(unsigned num)
{
unsigned sum = 0;
do
{
sum += num%10;
} while (num/=10);
return sum;
}
int main()
{
unsigned number = 12345;
unsigned sum = sum_of_digits (number);
std::cout << "Sum of digits in " << number <<
" is " << sum << std::endl;
}
...

Read More

###### Asked in C++ Programming

### What if -1 is assigned to a unsigned variable in C plus plus?

If you assign -1 to a unsigned variable it will contain the
biggest number its able to hold.
For example if you assign -1 to a unsigned int it will be
4294967295 as its the biggest number a unsigned int can hold.
...

Read More

###### Asked in Math and Arithmetic

### Why is multiplying or dividing the numerator and denominator by the same nonzero number the same as multiplying or dividing the fraction the fraction by 1?

Because doing so is equivalent to multiplying or dividing by
x/x, which can be cancelled down to 1.
...

Read More

###### Asked in Math and Arithmetic

### What fraction is equivalent to three eights?

To get an equivalent fraction, multiply both numbers by the same
number. For example, multiplying by 2, you get 6/16.
...

Read More

###### Asked in Computer Programming, Math and Arithmetic

### What is the lowest value 6 bit number you can have in binary?

000000 is the lowest number in a 6 bit unsigned binary number
(meaning the high order bit is not the sign bit). If it is a signed
number then the lowest number would be represented by 100000 which
is equivalent to -32 in decimal.
Highest unsigned number in 6 bits is decimal 63.
Highest signed number in 6 bits is decimal 31.
...

Read More

###### Asked in Math and Arithmetic

### What number will make 19 go into 152 by multiplying?

8
8x19=152
This is equivalent to asking "what is 152/19?"

Read More

###### Asked in Computer Programming, C Programming

### How do you write program in 'c' palindrome or not palindrome the number using while loop?

Reverse the digits then test to see if the new number is the
same as the original number. If it is, the number is a palindrome,
otherwise it is not.
To reverse an unsigned integer (any base, default is 10):
unsigned rev (unsigned num, unsigned base=10)
{
unsigned r=0;
while (num)
{
r*=base;
r+=num%base;
num/=base;
}
return r;
}
...

Read More

###### Asked in Math and Arithmetic

### Could you answer Dividing a number by 2.5 is the same as multiplying a number by what?

it is the same as multiplying by 0.4

Read More

###### Asked in Math and Arithmetic

### What is one half percent of 349000?

Finding half of a percent of a number is equivalent to
multiplying the number by 0.005. In this instance, 349000 x 0.005 =
1745.
...

Read More

###### Asked in Math and Arithmetic, Algebra, Calculus

### Is it possible to solve the equation 5x equals 29 by multiplying both sides with the same number?

Yes. the number is 0.2 (or the equivalent 1/5).

Read More

###### Asked in Math and Arithmetic, Numbers

### Is multiplying a number by 2 is the same as halving that number?

no, dividing a number is halving it, multiplying iy by 2 is
doubling it

Read More

###### Asked in Math and Arithmetic

### What are equivalent fractions for 4 ninths?

There is an infinite number of equivalent fractions to 4/9 which
is produced by multiplying the denominator and the numerator by the
same number. For example, 8/18, 12/27, and 20/45 are all equivalent
to 4/9.
...

Read More