A byte is 8 binary bits, each of which hold a value of 0 or 1 (true or false). When counting in binary, a value of 11111111 is the highest value a byte can hold, this is 255. It doesn't matter what programming language is assigning a value to the byte, the highest it can hold is 255. A 'signed' byte uses one bit for the sign, and 7 for the value. Hence 7 bits can show values of up to 128 either side. That's a positive value of 1-127, along with the 0, and then negative values of -1 to -128. Again, regardless of the system assigning the value, 8 bits can only produce 255 different combinations.
A byte is a measure of memory in the computer, 8 bits is equal to one byte, a bit is a binary value of 1 or 0, you cannot really measure how much memory it can hold.
bool F1(int byte,int pos) { return(byte & 1<<pos) } //pos -> position in the field // say byte is b1011 and pos is 2 then it will return value 0
It can't. The maximum value of a single byte is 255.
As a 21 byte array of type char (including 1 byte for the null terminator).
Not without casting. A char is a 16 bit type, whereas a byte is an 8 bit type. Therefore the compiler cannot guarantee that the 16 bit value will fit into the 8 bit value without overflowing. If you attempt to stick a char into a byte, you will get a compiler error. To override this, you can cast the char value to a byte during assignment. However, you might get some unexpected results. A few examples below: char a = 'A'; byte b = a; //compiler error char a = 'A'; byte b = (byte)a; //valid, no error. b=65 char a = 172; byte b = (byte)a; //valid, no error, but b=-84 because of overflow.
2.0
Decimal (more formally, binary coded decimal) values store numeric information as digits encoded using the four bit binary equivalents: 0 (0000) to 9 (1001). That means a single byte can hold values between 0 and 99. But simply using the same byte to hold a binary value will yield values between 0 and 255 (or –128 and +127).
One byte of RAM can hold up to one byte of data. This is equivalent to one 8-bit (ASCII) character, such as a keyboard letter, number, or symbol.
1,000,000,000,000 bytes (trillion)
$500 - $550 or so, for a basic model in good condition. Firearms hold up their value pretty well.
1 byte (Unicode)