diff --git a/src/pages/blog/nand2tetris/+Page.jsx b/src/pages/blog/nand2tetris/+Page.jsx index 1f19923..337634a 100644 --- a/src/pages/blog/nand2tetris/+Page.jsx +++ b/src/pages/blog/nand2tetris/+Page.jsx @@ -1,21 +1,15 @@ import { useData } from "vike-react/useData" -export default function Page() { - const { blog } = useData() +function BooleanLogic() { return ( -
-
-

{blog.name}

-

{blog.time} · {blog.description}

-
- + <>

Boolean Logic

@@ -74,13 +68,57 @@ export default function Page() { -

So Not X = X Nand X.

+

Not X = X Nand X.


Since And is equal to Not Nand,and Not can be expressed using Nand:

-

A And B = Not (A Nand B) = (A Nand B) Nand (A Nand B)

+

A And B = Not (A Nand B) = (A Nand B) Nand (A Nand B)


Accroding to De Morgan's laws, it can be proven that Or can also be expressed using Nand:

-

A Or B = Not (Not A and Not B)

+

A Or B = Not (Not A and Not B)

+ + ) +} +function BooleanArithmetic() { + return ( + <> +

Boolean Arithmetic

+

In the ALU design project, there is a description:
if (f == 1) sets out = x + y, else sets out = x & y

+

Equal to:

+ + + ) +} + +export default function Page() { + const { blog } = useData() + return ( +
+
+

{blog.name}

+

{blog.time} · {blog.description}

+
+ + +
) }