-
Notifications
You must be signed in to change notification settings - Fork 0
/
byte.html
31 lines (29 loc) · 1.32 KB
/
byte.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!-- bits/bytes -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>byte</title>
<meta content="width=device-width,initial-scale=1,user-scalable=no" name=viewport>
<script src="style.js" defer></script>
</head><body>
You can represent 256 things w/ a byte (8 bits = 1 byte)
The bits in a byte have numbers.
The rightmost bit is bit 0, and the left hand one is bit 7
Those two bits also have names. The rightmost is the least
significant bit.   The leftmost within that set of bits
would be the most significant.   The largest number you can
represent with 8 bits is 11111111, or 255 in decimal notation.
00000000 is the smallest in that set. Logical operators compare
A 32-bit signed integer is an integer whose value
is represented in 32 bits (i.e. 4 bytes).
Bits are binary, meaning they may only be a zero or a one.
Thus, the 32-bit signed integer is a string of 32 zeros and ones.
The signed part of the integer refers to its ability to represent
both positive and negative values. A positive integer will have its
most significant bit (the leading bit) be a zero, while a
negative integer will have its most significant bit be 1
Because of this,   the most significant bit of a signed integer
is typically called the 'sign bit', since its purpose is to denote the
sign of the integer
</body></html>