answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

How many bits to represent twenty-six?

23 can be represented in binary as 10111 and would therefore require 5 bits to represent.


Integers need how many bits to stored in C plus plus?

It depends on the type of integer (such as long, short, int and char) and the specific implementation of C++. The only guarantee is that a char must occupy one byte (sizeof(char)==1). An int is typically 32-bits (4 bytes), but only sizeof(int) can tell you for sure.


Maximum value of an unsigned integer is how many bytes?

Type size of an unsigned integer is compiler specific. Most compilers will provide 4 bytes, but the size can range from 2 to 8, or (again) whatever the implementation provides. Note: 1. Maximum value: UINT_MAX (in limits.h) 2. Size in bytes: sizeof (unsigned)


How many bits does a 1 frame per second have?

In order to know how many bits/second there are in 1 frame/second, you need to know how many bits are in that frame. In a typical asychronous serial protocol with 8 bits per frame, the bit rate would be 0.125 bits/second. If you are talking the IP network layer of TCP/IP, then the frame size is very dependent on the underlying message payload and headers.The original question, by the way, is invalid. Its asks "how many bits does...", but it should have asked "how manys bits per second does...".


How do you design a function named feetToinches that accepts a number of feet as an argument and returns the number of inches in that many feet?

You design it as an inline function with a constant unsigned reference parameter. Since there are 12 inches to the foot, the return value is the product of the parameter and 12. However, you must also ensure the return type has enough bits to store the result. C++ example: inline unsigned int feetToinches( const unsigned int & feet ){ return( feet < 357913941 ? feet * 12 : 0 ); } The above example assumes an int is 32-bits wide. If the input is larger than 357913941 (feet) then there won't be enough bits to store the result, so zero is returned instead. If the input is non-zero and the return is zero, you know the conversion failed. We use unsigned data types because you cannot have a negative unit of distance. We use a reference parameter to prevent the parameter from being copied (not strictly necessary if the type will fit within a pointer variable, but good practice nonetheless). The parameter is constant because the function does not need to modify the parameter. It is inline because the code is not complicated and is a prime candidate for inline expansion, thus eliminating the need for a function call altogether.

Related Questions

How many bits are needed to represent decimal 200?

8 bits if unsigned, 9 bits if signed


How many decimal numbers can be represented by 4-bits?

There are 16 decimal numbers that can be represented by 4-bits.


How many different number can be represented using 5 bits?

Using 5 bits, a total of (2^5) different numbers can be represented. This equals 32, allowing for values ranging from 0 to 31 in unsigned binary representation. If signed representation is used (e.g., two's complement), the range would be from -16 to 15, still totaling 32 distinct values.


How many bits of data are represented by a single baud in CAP-64?

6 bits


How many characters can be represented using 8 bits?

8 bits = 64 character


How many things can be represented with 10 bits?

4


How many things can be represented by 16 bits?

A total of 65,536 items can be represented with 16 bits. A total of 64 items can be represented with 6 bits and 1024 items with 64 bits.


How many different numbers can be represented by 3 bits?

1000


How many symbols can be represented by a bit pattern with 10 bits?

1024


How many numbers can be represented with 5 bits?

With 5 bits, you can represent (2^5) different numbers, which equals 32. This includes numbers ranging from 0 to 31 in unsigned binary representation. If using signed binary representation (like two's complement), the range would be from -16 to 15, still allowing for 32 distinct values.


How many different binary codes can be represented in 2 bits?

2


How many different values can be represented by 12 bits?

2^12=4096