Skip to content

Commit

Permalink
Correction to floating point conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
nguy8tri authored Jan 9, 2024
1 parent e3a03e4 commit ea9e8c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notes/primitive-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ This is arranged such that the resulting float/double number is:

<div style="text-align: center">

$$(-1)^{S_2}\times10^{E_2 - O_2}\times(1.M)_2$$
$$(-1)^{S_2}\times2^{E_2 - O_2}\times(1.M)_2$$

</div>

Expand All @@ -186,4 +186,4 @@ These have a very simple representation, as they are the equivalent of an unsign

## Booleans

Booleans are quite simple. It is 0 for false and 1 for true, but you'll notice that we use an entire byte for it as opposed to a single bit. This is because since everything else is a whole multiple of a byte, people decided to make it at least a byte too.
Booleans are quite simple. It is 0 for false and 1 for true, but you'll notice that we use an entire byte for it as opposed to a single bit. This is because since everything else is a whole multiple of a byte, people decided to make it at least a byte too.

0 comments on commit ea9e8c4

Please sign in to comment.