We continue on in our journey, today is Chapter 3: Sequential Logic of Building a Modern Computer From First Principles. Last time we took a look at Boolean Arithmetic and we saw how we could start to create the ALU using these arithmetic chips. These chips are called combinational chips because they compute functions that depend solely on different combinations of their given input values. These relatively simple chips are able to provide a lot of the important processing functions, but the one thing they cannot do is maintain state. Obviously it does us no good to compute a value…

This week I will be continuing a review of Building a Modern Computer from First Principles. Last week we learned a little bit about Boolean Logic now let’s check out chapter 2: Boolean Arithmetic.

The Central Processing Unit (CPU) is the electronic circuitry within a computer that executes instructions that make up a computer program. One of the important pieces of the CPU is the Arithmetic Logical Unit (ALU). The ALU is a digital circuit that performs arithmetic and logical operations on binary numbers. …

Lately I’ve been reading the book Building a Modern Computer from First Principles and I thought it would be good to reiterate some of the things I have learned so far. If you are interested in a broad overview of how computers work from the ground up, I highly recommend checking out this resource.

In the preface of this book, they say that many computer science students are missing the forest for the trees. What they mean is that the most fundamental ideas and techniques in computer science are now hidden under many layers of obscure interfaces and proprietary implementations…

Since its December and Advent of Code is happening, I thought we may as well give a few a go. Today we will look at the day 2, Password Philosophy problem. The passwords in our database have been corrupted and now we must go through these passwords and flag the valid passwords and return how many are valid. The passwords are given to us as strings, the first part will have two numbers separated by a dash and this represents the minimum number of times a certain number should appear and the max number of times that letter should appear…

Today we will be looking at a fun library I have been working with recently called Fabric.js. Fabric provides us with an interactive object model that is on top of the native canvas element. It allows us to easily add objects to the canvas and manipulate them in various ways. Let’s check it out. I am working on a React project currently, so we will be working with fabric in React. First things first let’s head to our terminal and create our project. (Also this may only be helpful if you are familiar with React, as well as React Hooks)

Today’s problem will be Word Ladder.

Alright first things first let’s discuss what this question is asking us for. We start with a beginWord and an endWord. We want to find the SHORTEST transformation sequence (other words, shortest path) from the beginWord to the endWord. The condition is that every step we take, we can only change one letter of each word, as well each ‘transition’ word must be included in our wordList.

We can think of the beginWord and the endWord as representing two nodes on a graph, the start node and the end node. The question is then…

Today’s question will be Determine if Two Strings are ‘Close’:

The question asks us if after performing certain operations, are the words ‘close’ (can we attain word2 from performing operations on word1). The first operation allows us to swap any two existing characters. If we think about swapping any two characters, X times, that is essentially the same as ordering our string in any way we want. Let’s look, say we had word1 = ‘abc’ and word2 = ‘bca’. In word2 if we swap ‘b’ -> ‘a’, we then have ‘acb’, and then we can swap ‘c’ -> ‘b’, and…

Todays problem is a fun one! Let’s take a look at Spiral Matrix.

Todays problem will be Jump Game.

Largest Values From Labels — Lets Get Greedy

Today’s problem will be Largest Values from Labels.

The question asks us to return the largest possible sum of the subset S. This means we should probably order our items from largest to smallest, and then we can take the items if we have not used more than the use_limit. We can keep track of how many items of each label have been used by using a hash table.

nathan brickett

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store