0% found this document useful (0 votes)
33 views

CS Assignment 2 PDF

This is CS Assignment 2.pdf

Uploaded by

Qazi Qazi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

CS Assignment 2 PDF

This is CS Assignment 2.pdf

Uploaded by

Qazi Qazi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Name: Qazi Mudasir Ahmed

Roll No: 24P-0544


Section: BSCS-1C

Topic: Numbering System & Machine Language


Title: Programming Fundamentals
Assignment#1

😁
😭
🤐
😡
☠️
For initial testing of the system:

 Write first 15 numbers of the above numbering system.


 😁= 0
 😭= 1
 🤐= 2
 😡= 3
 ☠️= 4
 😁= 10
 😭= 11
 🤐= 12
 😡= 13
 ☠️= 14
 😁= 20
 😭= 21
 🤐= 22
 😡= 23
 ☠️= 24
• Convert the given number into decimal and then binary:
☠️ 😁😡 😁 😁 = (40300)5

Page 1|2
Name: Qazi Mudasir Ahmed
Roll No: 24P-0544
Section: BSCS-1C
1. Decimal Value
(40300)5= (4(625) + 0(125) + 3(25) + 0(5) + 0(1)) = 2500 + 75

(2575)10
2. Converting the above decimal number into binary

2048 1024 512 256 128 64 32 16 8 4 2 1


1 0 1 0 0 0 0 0 1 1 1 1

(101000001111)2
3. Design a machine language for this processor under the emoji
numbering system which will perform the following
operations:
1. Display Emoji = 🤐☠️😡😭
2. Copy Emoji = 😡😡☠️☠️
3. Paste Emoji = ☠️😁😡🤐
4. Delete Emoji = 😁😁☠️☠️

4. For the system to effectively communicate with the binary processor also
write binary equivalents of your chosen Emoji Opcode (machine
language instruction) for each of the four operations above.

1. Display Emoji = 🤐☠️😡😭= (2431)5


 Decimal Value = (2(125) + 4(25) + 3(5) + 1(1)) = (366) 10
 Binary Value = (101101110) 2
2. Copy Emoji = 😡😡☠️☠️= (3344)5
 Decimal Value = (3(125) + 3(25) + 4(5) + 4(1)) = (474) 10
 Binary Value = (111011010) 2

3. Paste Emoji = ☠️😁😡🤐= (4032)5


 Decimal Value = (4(125) + 0(25) + 3(5) + 2(1)) = (517) 10
 Binary Value = (1000000101) 2

4. Delete Emoji = 😁😁☠️☠️= (0044)5


 Decimal Value = (0(125) + 0(25) + 4(5) + 4(1)) = (24) 10
 Binary Value = (11000) 2

Page 2|2

You might also like