https://github.com/codelixir/assembly-x86-64
Trying out writing arithmetic, conditional, looping components, procedure calls, conditional jumps and stacks in x86-64. For CSO course, Spring 2021.
https://github.com/codelixir/assembly-x86-64
Last synced: 10 months ago
JSON representation
Trying out writing arithmetic, conditional, looping components, procedure calls, conditional jumps and stacks in x86-64. For CSO course, Spring 2021.
- Host: GitHub
- URL: https://github.com/codelixir/assembly-x86-64
- Owner: codelixir
- Created: 2021-05-06T17:14:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T17:29:59.000Z (over 4 years ago)
- Last Synced: 2025-02-08T00:19:08.972Z (12 months ago)
- Language: Assembly
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://forthebadge.com)
This assignment uses x86-64 instruction set. You can find a cheatsheet [here](https://github.com/aadilmehdis/Computer-System-Organisation-2020/tree/master/Resources/x86).
This was done as a part of the Computer System Organisation course, Spring 2021
---
## Problem 1
Check if a given integer (64-bit) number, N, contains an odd number of 1s in its bit representation.
### Input/Output Format
- **INPUT**: You will be given an integer N.
- **OUTPUT**: TRUE, if the given number contains odd number of 1(s), FALSE otherwise.
### Sample Test Case
**Input**: N = 153 \
**Output**: FALSE \
*Note: Bit-wise representation of 153 = 010011001*
## Problem 2
Given a matrix A of dimension N x M. Find the transpose of the matrix A.
### Input/Output Format
- **INPUT** : N, M, and A.
- **OUTPUT**: Transpose of matrix A
### Sample Test Case
**Input** : \
2 3 \
1 2 9 \
0 4 7 \
**Output**: \
1 0 \
2 4 \
9 7
## Problem 3
Given integers N and M. Find modulo of sum of the prime numbers less than N with M.
### Input/Output Format
- **INPUT** : N, M.
- **OUTPUT**: (Sum of prime number less than N)% M.
### Sample Test Case
**Input** : 10 999 \
**Output**: 17