Functional NegBin implementaion

This commit is contained in:
trotFunky 2020-11-06 22:34:02 +01:00
commit 82c2bb9f1b
9 changed files with 332 additions and 0 deletions

20
NegBin/main.cpp Normal file
View file

@ -0,0 +1,20 @@
#include <iostream>
#include "NegBin.h"
int main()
{
NegBin a = 0b11011_nb;
NegBin b = 0b10010_nb;
std::cout << a << "-" << b << " = " << a-b << std::endl;
std::cout << a << "*" << 5 << " = " << a*5 << std::endl;
auto c = NegBin(6);
auto d = NegBin(-12);
std::cout << "6 is " << c << std::endl;
std::cout << "-12 is " << d << std::endl;
return 0;
}