subject

This program #1, you are required to develop a program that takes a numeric input (0 to 63) and converts it to binary. You will use the LMC (Little Man Computer) for this program. The LMC is a decimal only machine and outputs 3 digits (000 - 999). Since 2^6 is 64 combinations, 2 numbers will be output.
For example, a 24 is entered, the first digit out is 011, and the second is 000. Another, 33 input yields a 100 001. You can have an infinite loop or a stop input. The output has leading zero suppression. So a blank is considered a zero Here are the starting lines of code for a solution. Please study them and let me know if you have any questions. #line_label instruction value comment
Here are the starting lines of code for a solution. Please study them and let me know if you have any questions.
#line_label instruction value comment
IN
STO INPUT # STORE DATA IN
SUB 64 # CHECK THAT DATA IS IN RANGE
BRP END # NUMBER OUTSIDE RANGE
LDA INPUT # RESTORE WORKING VALUE
SUB 32 # CHECK FOR 32 OR GREATER
BRP SET_32 # SET OUTPUT
RET_32 LDA INPUT # RESTORE WORKING VALUE
SUB 16 # CHECK FOR GREATER THAN 16
BRP SET_16 # SET OUTPUT
RET_16 LDA INPUT # RESTORE WORKING VALUE
SUB 8 # CHECK FOR GREATER THAN 8
BRP SET_8 # SET OUTPUT
SET_16 STO INPUT # STORE VALUE
LDA OUTPUT_2 # LOAD OUTPUT VALUE
ADD TWO # ADD A VALUE OF TWO
STO OUTPUT_2
BR RET_16
SET_32 STO INPUT
LDA OUTPUT_2
ADD FOUR
STO OUTPUT_2
BR RET_32
RET_1 OUT OUTPUT_2
OUT OUTPUT_1
END HALT
OUTPUT_1 DAT 000
OUTPUT_2 DAT 000
INPUT DAT 000
FOUR DAT 100
TWO DAT 010
ONE DAT 001

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Read this excerpt from helen keller’s autobiography, the story of my life. have you ever been at sea in a dense fog, when it seemed as if a tangible white darkness shut you in, and the great ship, tense and anxious, groped her way toward the shore with plummet and sounding-line, and you waited with beating heart for something to happen? i was like that ship before my education began, only i was without compass or sounding-line, and had no way of knowing how near the harbour was. "light! give me light! " was the wordless cry of my soul, and the light of love shone on me in that very hour. . the morning after my teacher came she led me into her room and gave me a doll. the little blind children at the perkins institution had sent it and laura bridgman had dressed it; but i did not know this until afterward. when i had played with it a little while, miss sullivan slowly spelled into my hand the word "d-o-l-l." i was at once interested in this finger play and tried to imitate it. when i finally succeeded in making the letters correctly i was flushed with childish pleasure and pride. running downstairs to my mother i held up my hand and made the letters for doll. i did not know that i was spelling a word or even that words existed; i was simply making my fingers go in monkey-like imitation. in the days that followed i learned to spell in this uncomprehending way a great many words, among them pin, hat, cup and a few verbs like sit, stand and walk. based on this excerpt, which words best describe helen keller?
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 23.06.2019 19:30
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
You know the right answer?
This program #1, you are required to develop a program that takes a numeric input (0 to 63) and conv...
Questions
question
Mathematics, 13.10.2020 21:01
question
Mathematics, 13.10.2020 21:01
question
History, 13.10.2020 21:01
question
Social Studies, 13.10.2020 21:01
question
Mathematics, 13.10.2020 21:01
question
History, 13.10.2020 21:01
Questions on the website: 13722363