From 84ab11a923a37729a36f5a86c494edb41ead86f8 Mon Sep 17 00:00:00 2001
From: Chris Liu <59787860+acciochris@users.noreply.github.com>
Date: Sat, 9 Dec 2023 19:46:43 +0000
Subject: [PATCH] First part of mips-asm-2
---
blog/images/mips-asm-2/D-flip-flop.svg | 19 ++++++++++++
blog/images/mips-asm-2/and.svg | 9 ++++++
blog/images/mips-asm-2/set-reset-latch.svg | 28 +++++++++++++++++
blog/posts/mips-asm-2.md | 35 ++++++++++++++++++++++
4 files changed, 91 insertions(+)
create mode 100644 blog/images/mips-asm-2/D-flip-flop.svg
create mode 100644 blog/images/mips-asm-2/and.svg
create mode 100644 blog/images/mips-asm-2/set-reset-latch.svg
create mode 100644 blog/posts/mips-asm-2.md
diff --git a/blog/images/mips-asm-2/D-flip-flop.svg b/blog/images/mips-asm-2/D-flip-flop.svg
new file mode 100644
index 0000000..4af35d1
--- /dev/null
+++ b/blog/images/mips-asm-2/D-flip-flop.svg
@@ -0,0 +1,19 @@
+
+
+
+
\ No newline at end of file
diff --git a/blog/images/mips-asm-2/and.svg b/blog/images/mips-asm-2/and.svg
new file mode 100644
index 0000000..ca6219b
--- /dev/null
+++ b/blog/images/mips-asm-2/and.svg
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/blog/images/mips-asm-2/set-reset-latch.svg b/blog/images/mips-asm-2/set-reset-latch.svg
new file mode 100644
index 0000000..1ec3d0a
--- /dev/null
+++ b/blog/images/mips-asm-2/set-reset-latch.svg
@@ -0,0 +1,28 @@
+
+
+
+
\ No newline at end of file
diff --git a/blog/posts/mips-asm-2.md b/blog/posts/mips-asm-2.md
new file mode 100644
index 0000000..c85bdf8
--- /dev/null
+++ b/blog/posts/mips-asm-2.md
@@ -0,0 +1,35 @@
+---
+date: 11 Nov, 2023
+tags: MIPS, processor
+category: CS
+---
+
+# Building a MIPS Processor from Scratch
+
+Chapter 4 of *Computer Organization and Design* explains how a computer can be build from scratch,
+using logic gates. Let's take a look.
+
+## Combinational and State Elements
+
+There are two types of elements we use when designing a classical computer, combinational and state.
+Combinational elements operate on data, while state elements, as the name suggests, contain state.
+
+For example, a simple AND gate is a combinational element:
+
+
+
+While a set-reset latch is a state element:
+
+
+
+For a set-reset latch, when we assert the set signal (S) and deassert the reset signal (R), Q is asserted
+and vice versa. A more complex version that incorporates the clock signal is the D flip-flop:
+
+
+
+With combinational and state elements, we can build a finite state machine, which is basically what computers
+are.
+
+## Pipelining
+
+