M E A N S C R I P T . N E T            
Link
copied!

2.1. Ones And Zeros 2.3. Byte Size

2.2. Byte

A bit is such a tiny unit that for practical reasons we usually talk about bytes. One byte is eight bits.

One byte contains eight bits that can represent all kind of data depending on context.

A common way is to think a byte as a number whose value is something between 0 and 255. That's because eight bits have 256 different combinations of ones and zeros.

Here's all the combinations:

0:   00000000  32:  00100000  64:  01000000  96:  01100000  128: 10000000  160: 10100000  192: 11000000  224: 11100000
1:   00000001  33:  00100001  65:  01000001  97:  01100001  129: 10000001  161: 10100001  193: 11000001  225: 11100001
2:   00000010  34:  00100010  66:  01000010  98:  01100010  130: 10000010  162: 10100010  194: 11000010  226: 11100010
3:   00000011  35:  00100011  67:  01000011  99:  01100011  131: 10000011  163: 10100011  195: 11000011  227: 11100011
4:   00000100  36:  00100100  68:  01000100  100: 01100100  132: 10000100  164: 10100100  196: 11000100  228: 11100100
5:   00000101  37:  00100101  69:  01000101  101: 01100101  133: 10000101  165: 10100101  197: 11000101  229: 11100101
6:   00000110  38:  00100110  70:  01000110  102: 01100110  134: 10000110  166: 10100110  198: 11000110  230: 11100110
7:   00000111  39:  00100111  71:  01000111  103: 01100111  135: 10000111  167: 10100111  199: 11000111  231: 11100111
8:   00001000  40:  00101000  72:  01001000  104: 01101000  136: 10001000  168: 10101000  200: 11001000  232: 11101000
9:   00001001  41:  00101001  73:  01001001  105: 01101001  137: 10001001  169: 10101001  201: 11001001  233: 11101001
10:  00001010  42:  00101010  74:  01001010  106: 01101010  138: 10001010  170: 10101010  202: 11001010  234: 11101010
11:  00001011  43:  00101011  75:  01001011  107: 01101011  139: 10001011  171: 10101011  203: 11001011  235: 11101011
12:  00001100  44:  00101100  76:  01001100  108: 01101100  140: 10001100  172: 10101100  204: 11001100  236: 11101100
13:  00001101  45:  00101101  77:  01001101  109: 01101101  141: 10001101  173: 10101101  205: 11001101  237: 11101101
14:  00001110  46:  00101110  78:  01001110  110: 01101110  142: 10001110  174: 10101110  206: 11001110  238: 11101110
15:  00001111  47:  00101111  79:  01001111  111: 01101111  143: 10001111  175: 10101111  207: 11001111  239: 11101111
16:  00010000  48:  00110000  80:  01010000  112: 01110000  144: 10010000  176: 10110000  208: 11010000  240: 11110000
17:  00010001  49:  00110001  81:  01010001  113: 01110001  145: 10010001  177: 10110001  209: 11010001  241: 11110001
18:  00010010  50:  00110010  82:  01010010  114: 01110010  146: 10010010  178: 10110010  210: 11010010  242: 11110010
19:  00010011  51:  00110011  83:  01010011  115: 01110011  147: 10010011  179: 10110011  211: 11010011  243: 11110011
20:  00010100  52:  00110100  84:  01010100  116: 01110100  148: 10010100  180: 10110100  212: 11010100  244: 11110100
21:  00010101  53:  00110101  85:  01010101  117: 01110101  149: 10010101  181: 10110101  213: 11010101  245: 11110101
22:  00010110  54:  00110110  86:  01010110  118: 01110110  150: 10010110  182: 10110110  214: 11010110  246: 11110110
23:  00010111  55:  00110111  87:  01010111  119: 01110111  151: 10010111  183: 10110111  215: 11010111  247: 11110111
24:  00011000  56:  00111000  88:  01011000  120: 01111000  152: 10011000  184: 10111000  216: 11011000  248: 11111000
25:  00011001  57:  00111001  89:  01011001  121: 01111001  153: 10011001  185: 10111001  217: 11011001  249: 11111001
26:  00011010  58:  00111010  90:  01011010  122: 01111010  154: 10011010  186: 10111010  218: 11011010  250: 11111010
27:  00011011  59:  00111011  91:  01011011  123: 01111011  155: 10011011  187: 10111011  219: 11011011  251: 11111011
28:  00011100  60:  00111100  92:  01011100  124: 01111100  156: 10011100  188: 10111100  220: 11011100  252: 11111100
29:  00011101  61:  00111101  93:  01011101  125: 01111101  157: 10011101  189: 10111101  221: 11011101  253: 11111101
30:  00011110  62:  00111110  94:  01011110  126: 01111110  158: 10011110  190: 10111110  222: 11011110  254: 11111110
31:  00011111  63:  00111111  95:  01011111  127: 01111111  159: 10011111  191: 10111111  223: 11011111  255: 11111111

Numbers can be presented with bits, and letters can be presented with numbers.

By giving each letter a numerical value, we can "write text" with numbers, and thus with bits. For example, the numerical value for letter 'h' is number 104, for 'e' number 101, and for 'y' 121.

Now we can write 'hey' with numbers 104, 101, and 121, or in bits, using the chart above:

        1101000 1100101 1111001

If there's a text 'hey' in a web page you loaded, somewhere in the memory, in the web page's area of the memory there are those bits above.



Next: 2.3. Byte Size

2.1. Ones And Zeros


Copyright (C) 2021, Meanwhale ↑ top