Full adder simulation

A full adder simulation implementation in C++. It is implemented with a “adder queue” as part of the assignment prerequisites was adding 8 binary strings to a buffer for adding. #include <iostream> #include <vector> #include <algorithm> //////////////////////////////////////////////////////////////////////////////// // Function Prototypes //////////////////////////////////////////////////////////////////////////////// std::string fullAdder(std::vector<std::vector*> adderIn); int userActivity(std::string stringBuff[9], std::vector<std::vector*> &adderInput); void …

Calculating nth Fibonacci number

This is simply an implementation of Binet’s formula in C++; someone had a question regarding calculating Fibonacci numbers from the nth number, backwards, so I created this small program. It calculates Fibonacci numbers from the 50th, down to the 1st, in reverse. Python would allow for greater Fibonacci sequence calculations …

Logical Argument Truth Table Generator

For a discrete mathematics lab, I was required to submit a program that would generate a truth table given two statements and determine it’s validity; if not valid, it will indicate which columns are incorrect. Part of the prerequisite (for simplicity) was hardcoding in the premise and conclusion; this is …

Project Euler #15: Lattice Paths

Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 20×20 grid? This problem is solvable via combinatorics; since you are …