Answered step by step
Verified Expert Solution
Question
1 Approved Answer
At this time we have a task for you to do . You are to write several functions that do binary math on character strings
At this time we have a task for you to do You are to write several
functions that do binary math on character strings of Ts and Fs The
functions you will fill in are: WRITE USING THE LANGUAGE C
#include
#include
#include "binarymath.
Negate a BINARYSIZE binary number expressed as a character string
Cparam number The number we are passed
ereturns negated version of the number
char negateconst char number
return number;
Add two BINARYSIZE binary numbers expressed as
a character string.
Eparam a First number to add
Cparan b Second number to add
ereturn
char addconst char a const char b
return a;
kt
Subtract two BINARYSIZE binary numbers expressed as
a character string.
Cparam a First number
Cparam b Second number
ereturn a b
char subconst char a const char b
f
return ;
Multiply two BINARYSIZE binary numbers expressed as
a character string.
Cparam a First number
Ceparam b Second number
erreturn
char mul const char const char :
return ;
The file binarymath.h includes the constant BINARYSIZE:
The size of the binary numbers to use
#define BINARYSIZE
You can use this value in expressions just like any other number:
Create a circuit for to demultiplexer in Cirsim. Name the inputs S
and I. Name the outputs and They should match the
same values in the characteristics table table.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started