Question: 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 'T's and 'F's. The
functions you will fill in are: WRITE USING THE LANGUAGE C
#include
#include
#include "binarymath. h"
/**
Negate a BINARY_SIZE binary number expressed as a character string
Cparam number The number we are passed
ereturns negated version of the number
***?
char *negate(const char *number)
[
}
return number;
/**
Add two BINARY_SIZE binary numbers expressed as
a character string.
Eparam a First number to add
Cparan b Second number to add
ereturn a+b
**?
char *add(const char *a, const char *b)
[
return a;
}
/**kt.
Subtract two BINARY_SIZE binary numbers expressed as
a character string.
Cparam a First number
Cparam b Second number
ereturn a - b
***?
char *sub(const char *a, const char *b)
f
}
return a;
1****
Multiply two BINARY_SIZE binary numbers expressed as
a character string.
Cparam a First number
Ceparam b Second number
erreturn a**b
**?
char ?** mul (const char ?**a, const char {:?**b)
[
}
return a;
The file binarymath.h includes the constant BINARY_SIZE:
/// The size of the binary numbers to use
#define BINARY_SIZE 100
You can use this value in expressions just like any other number:
Create a circuit for 2-to-4 demultiplexer in Cirsim. Name the inputs S0,
S1, and I. Name the outputs 00,01,02, and 03. They should match the
same values in the characteristics table table.
 At this time we have a task for you to do.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!