Write a small library in the C programming language to do Minifloat (8-bit binary floating-point numbers) operations. DONOT USE PRINTF. The requirements are below

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

PLEASE DO NOT USE PRINTF-> professor doesnt want us to use it

Write a small library in the C programming language
to do Minifloat (8-bit binary floating-point numbers)
operations. DONOT USE PRINTF. The requirements
are below
requirements
Meeting these requirements will collect the regular points.
add - Add two Minifloat numbers and return the
result.
mult - Multiply two Minifloat numbers and return the
result.
Abstract data type with proper header and source
files.
sub - Subtract two Minifloat numbers and return the
result.
div - Divide two Minifloat numbers and return the
result.
Input checking and rejection of out-of-bounds or
improperly formatted Minifloat numbers by returning
predefined special values. These values should be
declared as constants in the header file.
Transcribed Image Text:Write a small library in the C programming language to do Minifloat (8-bit binary floating-point numbers) operations. DONOT USE PRINTF. The requirements are below requirements Meeting these requirements will collect the regular points. add - Add two Minifloat numbers and return the result. mult - Multiply two Minifloat numbers and return the result. Abstract data type with proper header and source files. sub - Subtract two Minifloat numbers and return the result. div - Divide two Minifloat numbers and return the result. Input checking and rejection of out-of-bounds or improperly formatted Minifloat numbers by returning predefined special values. These values should be declared as constants in the header file.
Expert Solution
Step 1

Computer Memory and Data Representation
Computers use a fixed number of bits to represent numbers, characters, or other pieces of data. An n bit repository can represent up to 2^n different businesses. For example, a 3-bit memory space can contain one of eight binary patterns: 000, 001, 010, 011, 100, 101, 110, or 111. So it can represent at least 8 different entities. It can be used to represent the numbers 0 to 7, the numbers 8881 to 8888, the letters “A” to “H”, or up to 8 different types of fruit such as apples, oranges, and bananas. Or up to 8 animals including lions and leopards etc.

For example, integers can be represented in 8bit, 16bit, 32bit, or 64bit formats.As the editor of the programme, you choose the proper minimum length for your values.The range of total values that can be expressed will be limited as a result of your choices.With the exception of the minimal length, the entire number can be expressed in a variety of ways, for example, unsigned versus signed numbers. The range of an 8bit signed integer is 0 to 255, while the range of an 8bit unsigned number is -128 to 127, representing 256 different values.

It is important to note that computer memory space only retains a binary pattern. It is entirely up to you, as the editor, to decide how these patterns will be interpreted. For example, the 8bit binary pattern "0100 0001B" can be interpreted as a 65 signature number, or an ASCII letter 'A', or other private information known only to you. In other words, you have to first decide how you represent a piece of data in a binary pattern before binary patterns make sense. The definition of a binary pattern is called data representation or coding. In addition, it is important that data representation systems are agreed upon by all parties, that is, industrial standards need to be developed and adhered to.

Once you have decided on a data representation system, certain constraints, in particular, accuracy and scope will be set. Therefore, it is important to understand the representation of the data in order to write the most appropriate and efficient programs

Egyptian hieroglyphs (next to left) were used by the ancient Egyptians from 4000BC. Unfortunately, after 500 AD. No one could read ancient Egyptian hieroglyphs until 1799, when Napoleon's troops discovered the Rosetta Stone (during the Napoleonic invasion of Egypt).
The
Rosetta Stone (left) was carved in 196 BC. In the name of Ptolemy V. Basically all three texts contained the same text, and ancient Greek was still incomprehensible, which gave clues to the interpretation of the Egyptian text.

Data cannot be determined without knowing the behavior of the history, the code system.




trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY