This gitHub repository is for the Third assignment given in Computer Systems course, Bar Ilan University.
Description • Installing And Executing • Author
This project is the first assignment in the Computer Systems course. Its purpose is to enlarge my understanding of the representation of bytes in different computers.
There are 3 parts to this project:
-
Write a function that tells if the computer you run this program on is using Big Endian represantaion or Little Endian representation. If it uses Big Endian, it will print 0. if it uses Little Endian, it will print 1.
-
Write a function which receives an array of 8 bytes of boolean values, and calculate its decimal representation in Two's Complement.
-
Write a function which receives an array of 8 bytes of boolean values, and calculate its decimal representation in Sign-Magnitude.
To clone and run this application, you'll need to use Git and the gcc compiler. From your command line:
# Clone this repository.
$ git clone https://github.com/TalMizrahii/EndianAndMagnitude
# Go into the repository.
$ cd EndianAndMagnitude
# Compile the program.
$ gcc main.c ex1.c ex1.h
# Run the program (Linux).
$ ./a.out