Binary basics that our computer science experts would like you to know

The vast majority of computers work using binary, either on or off. The term bit comes from Binary digit, and so we group 8 bits to make a byte. The first mainstream home computers were 8-bit machines (there were some 4-bit machines, but they were produced in small quantities for hobbyists), which came out in the late 1970s, early 1980's. The IBM computer was introduced in 1981 and was an 8/16 bit machine, and cost a few thousand dollars. However, its performance is far less than the cheapest existing Android phones. In fact, you are probably looking at this page on a machine with 8GB of memory, and a 3 GHz processor, so that is 125,000 times as much memory and 600 times faster (although it's actually quicker than that since it can do more in each cycle) so it is closer to 300,000 times faster. Personal computers were developed in the mid-'80s and were 16/32 bit machines. IBM introduced the 386, a 32-bit processor in 1989, and finally, 64-bit machines were released in 2003

Name C Java Largest UnsignedValue Largest SignedValue
1 bit 1 1
4 nibble 15 7
8 byte char byte 255 127
16 word short char 65535 32767
32 dword int int ######## ########
64 qword long long long ######## ########
Numbers can be represented in a variety of formats. The most common ones are decimal, binary, and hexadecimal. Octal is base 8, but it's-seldom used, although, in C/Java, you can accidentally use it if you start a number with 0, so 007 is fine, but 008 would generate an error. Hexadecimal uses A-F to represent the digits 10-15 and has the advantage of being two hex digits per byte, so it is easy to represent data dumps. Each bit represents twice the previous value, so 001 would be 1, 010 is 2, and 100 represents 4, and the bits are combined to make all the values, so 101 means 4 + 1 or 5.

Number Binary Hexadecimal
0 0 0x0000
1 1 0x0001
10 1010 0x000a
15 1111 0x000f
16 10000 0x0010
255 11111111 0x00ff
1024 1E+10 0x0400
32767 1.11E+14 0x7fff
-32767 1E+15 0x8001
-32768 1E+15 0x8000
-1 1.11E+15 0xffff
Nothing much has changed when it comes to mathematical computations. However, there is an additional Boolean algebra that operates on individual bits. The other operations are and, or, not, and the exclusive or.

0 0 0 1
0 0 1 1
0 1 1 1
AND
&
Values are the same
0 1 1 1
0 0 1 1
0 1 1 1
OR
|
One value is true
0 1 1 0
0 0 1 1
0 1 1 1
XOR
^
Only one is true
1 0 1 0
0 1 1 1
NOT
! Swapped
Our computer science Experts have found that students seek computer science homework solutions for their typical assignment questions. Engineering students have to solve assignment questions covering various areas like CAD, including structural, industrial, and architectural topics, and faces great difficulties. They are always looking for good quality solutions in computer science assignment help from our group of tutors. They can get professional help from our computer science tutors who have years of experience.

Floating point

These give representations of integer values, but for floating-point values and special format is used, most computers use IEEE 754 format numbers. There are three components to a floating-point value, the sign, the exponent, and the mantissa. The mantissa uses 23 bits with an implicit one at the start, so 1.0000000 * (2 ** (exponent – 126)). This gives a range of 1.40129846432e-45 to 3.40282346639e+38 for floats and a much wider range of 4.94065645841e-324 to 1.79769313486e+308 for doubles. A double value uses 11 bits for the exponent and 52 bits for the fractional part.

Single Precision

Sign
Exponent Mantissa Value Explanation
0 1111111 0 1 This exponent means no shifting is applied
0 10000000 0 2 We double the value so change the exponent
0 1111110 0 0.5 And here we reduce the value by half, so reduce exponent by 1
0 11111110 1.11E+22 3.40E+38 Largest float
0 1 0 1.18E-38 Smallest normalized float
0 0 1 1.40E-45 Smallest float (when the exponent is 0, there is no implicit one on mantissa)
0 11111111 0 Infinity Infinity
0 11111111 1.11E+22 Not A Number Represents a value that shouldn't exist, for example, 1 / 0

Double Precision

Sign Exponent Mantissa Value Explanation
0 1E+09 0 1 This exponent means no shifting is applied
0 1E+10 0 2 We double the value so change the exponent
0 1E+09 0 0.5 And here we reduce the value by half, so reduce exponent by 1
0 1E+10 1E+51 1.79769313486e+308 Largest double
0 1000 0 #### Smallest normalized double
0 0 1 4.94065645841e-324 Smallest double (when the exponent is 0, there is no implicit one on mantissa)
0 1E+10 0 Infinity Infinity
0 1E+10 1E+51 Not A Number Represents a value that shouldn't exist, for example, 1 / 0

Characters

Characters are normally encoded in ASCII format. There are 127 ASCII characters, and the first 32 of them represent control codes.

Characters encoding table

Why our computer science homework help is the best

Our experts ProgrammingHomeworkHelp.com provide computer science homework help services for all categories of learners, especially for beginners who are very uncomfortable with the complicated assignment questions. Our online computer science tutors offer computer science homework help to students in theoretical as well as programming topics. Students who seek computer programming assignment help from our dedicated experts always get the required solutions on time. They have found our services very helpful as they get a proper explanation that helps them understand clearly and earn them a top grade. Use the subject line "do my computer science homework." Get our excellent services by contacting us through our email.