A computer systems programming assignment that implements integer arithmetic operations using only bitwise operators, helping students understand how computers perform basic mathematical operations at the hardware level.
This project implements fundamental integer arithmetic operations (add, subtract, multiply, divide, modulo) using only bitwise operators. The goal is to demonstrate understanding of:
- Two's complement representation
- Bitwise manipulation
- Carry propagation in addition
- Shift-and-add multiplication
- Long division algorithms
- Hardware-level integer arithmetic
- C++ Compiler: GCC 13+ or Clang 16+ with C++23 support
- Build System: CMake 3.30+
- Operating System: Linux, macOS, or Windows (with WSL2)
# Ubuntu/Debian
sudo apt update
sudo apt install build-essential cmake git clang-format clang-tidy
# macOS (with Homebrew)
brew install cmake llvm clang-format
# Windows (with Chocolatey)
choco install cmake git llvm- IDE: VS Code, CLion, or any C++ IDE
- Version Control: Git
- Testing Framework: GoogleTest (automatically downloaded via CMake)
git clone https://github.com/bmyjacks/CSC3060_data_lab.git
cd data_lab# Release build (recommended for performance)
cmake -DCMAKE_BUILD_TYPE=Release -B build
# Debug build (for development/debugging)
cmake -DCMAKE_BUILD_TYPE=Debug -B buildcmake --build buildctest --test-dir build -V# Run test executable directly
build/test_data_lab
# With GoogleTest filters
build/test_data_lab --gtest_filter="AddTest.*"The test suite includes:
- 60 total tests across 5 function suites
- Basic functionality tests
- Edge cases (INT32_MAX, INT32_MIN, overflow)
- Bit manipulation scenarios
Please refer to the assignment pdf.
Course: CSC3060: Computer Systems
Assignment: Data Lab
Due Date: January 30, 2026 23:59 UTC+8
Total Points: 100