I'm have trouble writing two programs that each print a table of the binary, octal, and hexadecimal equivalents of the decimal numbers in the range 1-256. The problem is that i have to use the computer lanuage C # which is relatively new please help.© BrainMass Inc. brainmass.com October 24, 2018, 6:25 pm ad1c9bdddf
Try the following program in C code. The program and executable is also attached.
void dec2bin(int decimal, char *binary);
char *conv_dec(int number, int base);
printf("Decimal t Binary t Hexadecimal t Octal n");
printf("t t %s",binary);
printf("t %s",conv_dec(i, 16));
printf("t t %s",conv_dec(i, 8));
printf("t t ...
This job examines binary, octal, and hexadecimal equivalents.
Boolean Algebra and circuit design
2. Convert the following decimal numbers to their binary, octal, and hexadecimal equivalents
3. Do the following work and answer the following questions:
a. Explain the relationship between an AND gate and a NAND gate in terms of Boolean Algebra and draw truth tables for both types of gate
b. Explain the relationship between an OR gate and a NOR gate in terms of Boolean Algebra and draw truth tables for both types of gate
4. In the following problems, use 0 to stand for False and 1 to stand for True. Indicate whether the answer is true or false
a. Jack is a boy AND Jill is a girl
b. Jack is NOT a girl
c. Jack is a boy OR Jill is a boy
d. Jack is NOT a boy AND Jill is NOT a boy
e. Jack is a boy OR Jill is NOT a boy
5. Fill in the following truth tables
A B NOT A NOT B A OR B NOT (A OR B) A AND B NOT A AND NOT B NOT (A AND B) NOT A OR NOT B