Program Code and Calculation

Verified

Added on  2022/11/29

|6
|724
|148
AI Summary
This document discusses program code and calculation. It provides examples of program code and explains how to perform calculations. The document also includes answers to common questions and explores different techniques related to program code and calculation.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Running head: PROGRAM CODE AND CALCULATION
PROGRAM CODE AND CALCULATION
Name of the Student:
Name of the University:
Author Note:

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
1PROGRAM CODE AND CALCULATION
ANSWER 1:-
MSG DB “1” (Message database 1) // press a key to continue 0
NMSG DB “0” (Message database 0)
NUM DB 75H; (Enter the required no 75H means binary 1110101)
START: MOV AX,@DATA (16 bit data register moved in AX)
MOV DS, AX (Move the data register in DS)
MOV AL, NUM (Copy a number into the register)
MOV BL, 02H; (The Separating starts from 2, Therefore BH is link to 02H)
MOV DX,0000H ; (To evade Divide overflow mistake)//DX
MOV AH,00H ; (To evade Divide overflow error)//AH
L1:DIV BL (Loop checking for prime number)
CMP AH,00H ; (Remains is equated with 00H (AH))
JNE NEXT (Conditional Obstacle for the next)
INC BH ; (BH is incremented if the Number is divisible by BL value)
NEXT:CMP BH,02H ; ( compare the value If BH > 02H so it is not prime )
JE FALSE ; ( Jump in equal if statement is not a Prime No)
INC BL ; ( Increase BL value)
MOV AX,0000H ; //(To evade Divide overflow mistake)
MOV DX,0000H ; //(To evade Divide overflow mistake)
MOV AL,NUM ; (Move the Defaulting no to AL)
CMP BL,NUM ; ( Route the loop until BL matches Value).
JNE L1; (Jump to check again with incremented rate of BL number)
//To show the assumed no is a Prime No//
TRUE: LEA DX, MSG (IF statement is true then LEA assign in the DX)
MOV AH, 07H; (Moved the number and Used to print a string)
INT 21H (Assume one integer value)
JMP EXIT ( Jump the exit value and show this number prime or
not)
FALSE: LEA DX, NMSG (If the prime condition is not match then address the in
bit message 0). (Elarde)
MOV AH, 07H; (Used to print a string)
INT 21H (Show this integer value)
Document Page
2PROGRAM CODE AND CALCULATION
EXIT: // (Exit this program)//
MOV AH, 4CH (If prime, so it is move)
INT 21H
END START (End this program and continue to the loop)
Document Page
3PROGRAM CODE AND CALCULATION

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
4PROGRAM CODE AND CALCULATION
ANSWER 2:-
K=4 means interleaving way is the 16.
Suppose, N= is the interleaving way.
N= 2k (so, 24 = 16)
For each scheme, the k subordinate bits of the address choice the section (Michael, Lachlan and
David Gómez-Barquero). So at this moment no of bits is (16*8= 128) or (32*4k=128k)
Then, 128k= 27
Addressable unit= (2^7*2^10) =2^17
17 bits are needing for each address
Memory banks are the 8= (23)
In this case, we can observe each module memory
(128/8=16)
That means 16= 24
So offset of the module is 4 bits
The number of the module is (17- 4=13 bits)
For a HOI
Chip (4) Offset chip(13)
0100 0000000001101
For a LOI
Offset chip(13) Chip(4)
0001000010100 1101
References:-
4k*8 (R0)
4k*8 (R1)
……………..
4k*8 (R17)
Document Page
5PROGRAM CODE AND CALCULATION
Elarde, Joseph. "A computer architecture/organization team project: reverse engineering
MARIE." Journal of Computing Sciences in Colleges 31.5 (2016): 21-28.
Michael, Lachlan, and David Gómez-Barquero. "Bit-interleaved coded modulation (BICM) for
ATSC 3.0." IEEE Transactions on Broadcasting 62.1 (2016): 181-188.
1 out of 6
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]