text to binary in assemble programming?

2009-12-04 8:24 am
text to binary in assemble programming?


I am taking a class about assemble programming right now. Professor told us to write the assemble code that can convert a text file to binary. So can anyone give me some ideas and what that actually about. I just want some guidelines so I can start earlier


Thank you everyone for your help

回答 (2)

2009-12-04 12:25 pm
✔ 最佳答案
I imagine that you would take a word from the file like "Hello" and convert the ASCII number for each individual character into binary characters that would be stored into another file

Hello would then become:
0100100001100101011011000110110001101111 where each letter is a series of 8bits

Remeber that each character is represented in a computer by a numeric value (ASCII). The 1's & 0's are characters in and of themselves. So your "binary" text file will grow in size by a factor of 8 as each letter in the original would then be represented by eight characters in a combination of 1's & 0's.

H = 01001000
2016-11-15 11:06 am
it is like asking how a lock "is familiar with" a key. each and every binary code (there are in basic terms sixty 5,635 opportunities in a working laptop or computing gadget that makes use of sixteen bit opcodes) is a sequence of on and rancid states - sixteen of them. those states reason the computing gadget to do something. (it is like turning on particular LEDs on your demonstrate screen - how can one demonstrate screen "understand" each and every language, and know each and every image, interior the international?) The CPU (that's what reads the codes) does what the code demands, by using fact the code grew to become particular switches on (the 1s) and particular different ones off (the 0s). possibly it demands the computing gadget to load the subsequent 3 instruments of binary codes, or to start working the code from a distinctive place in reminiscence, or positioned a definite code development out to the demonstrate. that's what it does.


收錄日期: 2021-04-24 08:16:15
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20091204002430AAF9nEz

檢視 Wayback Machine 備份