Skip to content

mchemrl/asm-number-processor

Repository files navigation

Task Description

The program is designed to read decimal numbers from the standard input (stdin), convert them into binary representation in two's complement form, and sort them in ascending order using the bubble sort algorithm. After that, the program calculates the median and the average of these numbers and outputs them in decimal format.

Instructions for Use

  1. Enter decimal numbers separated by spaces or new lines into the standard input (stdin).

  2. Press Ctrl + D (or Ctrl + Z on Windows) to end the input and start the processing.

  3. After processing, the program will output the median and the average of the numbers in decimal format.

Input Format

  1. The numbers should be decimal and separated by spaces or new lines.

  2. The input may contain up to 10,000 numbers.

  3. Lines are separated either by the byte sequence 0x0D and 0x0A (CR LF), or by a single 0x0D or 0x0A character.

  4. Negative numbers begin with a "-".

  5. If a number is too large in absolute value for a 16-bit signed representation, it will be represented as the maximum possible value.

Output Format

The program will output the median and the average of the processed numbers in decimal format.

Technologies

The program is written in Assembly language and uses standard libraries for input, processing, and output of data.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published