Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/memory-bytes-for-each-file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## How many bytes is enough for creating the file unit precisely

To know how many memory is enough for that file, you need to think how many charcaters or punctuation is inserted in the document like word
that needs to be stored in the file you were writing. For instance, think of it like how many charcaters are there in the, 3 characters right because
they are t, h, and e that forms the whole word "the". The same thing for computers, they read by how many digits or charcaters that form the whole word

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify that byte counts depend on encoding

This explanation equates file size to the number of “characters,” which only holds for single‑byte encodings and ASCII‑only content. If a reader stores any non‑ASCII text (e.g., accented letters, emoji, or non‑Latin scripts) in UTF‑8, each character can take multiple bytes, so counting characters will underestimate required memory. Consider explicitly stating that bytes per character depend on the file’s encoding and content.

Useful? React with 👍 / 👎.

in the end. Use regular bytes for very simple projects like for example, the file has only a 160 * 120 screen in total are and store all the bits per pixel
filling the screen by doing this because it is simple, it is just storing individual bits into the screen.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The content of this new file has several grammatical errors, typos (e.g., 'charcaters'), and unclear phrasing that make it difficult to understand. The title is also a bit awkward. I recommend rewriting the content to be more clear, concise, and grammatically correct.

Suggested change
## How many bytes is enough for creating the file unit precisely
To know how many memory is enough for that file, you need to think how many charcaters or punctuation is inserted in the document like word
that needs to be stored in the file you were writing. For instance, think of it like how many charcaters are there in the, 3 characters right because
they are t, h, and e that forms the whole word "the". The same thing for computers, they read by how many digits or charcaters that form the whole word
in the end. Use regular bytes for very simple projects like for example, the file has only a 160 * 120 screen in total are and store all the bits per pixel
filling the screen by doing this because it is simple, it is just storing individual bits into the screen.
## How Many Bytes Does a File Need?
To determine how much memory a file requires, you need to consider its contents. For example, in a text file, the size is determined by the number of characters (including spaces and punctuation). Each character typically requires one or more bytes of storage.
For other types of files, like images, the calculation is different. For an image on a 160x120 pixel screen, the total memory needed would be the total number of pixels (160 * 120) multiplied by the number of bytes required to store the color of each pixel (which depends on the bits per pixel, or BPP).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Screen memory example understates bytes per pixel

The 160×120 example suggests storing “individual bits” for the screen, which is only correct for a 1‑bit monochrome framebuffer. Most displays use at least 8‑ or 16‑bit color, so memory sizing must be width × height × bytes_per_pixel (e.g., 160×120×2 bytes for 16‑bit color). As written, this would mislead readers into under‑allocating memory unless they explicitly use 1‑bpp storage.

Useful? React with 👍 / 👎.