Skip to content

Commit 7281fea

Browse files
Update bufferList.md
1 parent 8d67951 commit 7281fea

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

docs/reference/buffer/bufferList.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,6 @@
11
# Buffer List
2-
32
A list of members exposed in the Buffer namespace and interface.
43

5-
6-
A **Buffer** is a **fixed size array of bytes (8 bits)** which allocates a new buffer. It is also stored in **contiguous memory**. The difference between arrays and buffers come down to a fact of **precision**. Use **Buffers** for a fixed size array of bytes, but use **Arrays** for dynamic data types (numbers, strings, booleans, etc.) Arrays are **dynamic** (of a process or system)
7-
8-
In **JavaScript** and **TypeScript**, arrays automatically dynamic by default. Some languages do autotmatically have fixed size arrays by default, and while others don't support it because they don't support resizing. A buffer is never dynamic, it always makes sure all the bytes are **fixed**.
9-
10-
A **bit** is a binary digit which uses base 2. For example, 8 bits stand for 8 binary digits. In base 2, we have only zeroes and ones because we have only 2 digits.
11-
12-
The reason why buffers read by bytes instead of simple values because the computer understands bits (0, 1), which represents on and off in the computer architecture.
13-
* 0 = off
14-
* 1 = on
15-
16-
Here is an example showing how they are connected to each other.
17-
18-
[Battery +] -----( SWITCH )-----[Light]-----[Battery -]
19-
20-
Binary math came to use electricity because engineers realized electrical switches naturally implement Boolean logic.
21-
22-
The person who created the boolean system is [Gottfried Wilhelm Leibniz](https://en.wikipedia.org/wiki/Gottfried_Wilhelm_Leibniz).
23-
The other person who created boolean alegebra is [Georg Boole](https://en.wikipedia.org/wiki/George_Boole).
24-
254
## Methods and Properties
265

276
* The Buffer.create(size: number) method stores bytes in a fixed size of memory.

0 commit comments

Comments
 (0)