ALL > Computer and Education > courses > university courses > undergraduate courses > An Overview of Computer Science > 2017-2018-1 class > homework >
homework-1 Version 0
👤 Author: by writer 2017-10-13 00:04:58
Why computer uses the string of  two bits (0, 1) to represent information?  How to distinguish  Intergers from  characters using the same bit string?

Please login to reply. Login

283385508qqcom • 2017-10-15 21:06:57
computer is just a machine. it can not read our language.it can only know the electrical signal.   high level is 1 and low level is 0.

computer itself can not distinguish char or int;

when we write code such as char、int,use software to compile it ,then computer knows it.

string has a '\0' at the end of the characters. PostVer 0

Please login to reply. Login

992632427qqcom • 2017-10-19 19:59:21
1.I think it beneficial for computer to use the string of two bits (0, 1) to represent information.The string of two bits represent the information of on and off,true and false,which make calculation more effective.And its character is helpful for computer to simplify analyzation,calculation and execution.At length ,it has the advantages of strong anti-interference ability and high reliability.

2. PostVer 0

Please login to reply. Login

1058437713qqcom • 2017-10-19 20:55:33
<!--StartFragment -->
1.Because the computer runs by electricity ,and the electronic only two positive and negative.
2.I don't know.
&nbsp; PostVer 0

Please login to reply. Login

602592575qqcom • 2017-10-19 21:27:54
1.

(1)Because computer is based on the circuit, and the digital "1" and "0" means the opening and closing in circuit.

(2)  Binary is easy to compute.

(3) It is easy to store information because the hardware can only store "1" and "0". (sunken or plane).

2.   Such as 1010001, it can means 81 and it can also means A.

I think we cant distinguish them unless we know it before.

&nbsp;

&nbsp; PostVer 0

Please login to reply. Login

59739640qqcom • 2017-10-19 21:37:31
The first question: Because binary is very convenient and logical (0,1 represent ture and false).In addition,it is very useful.

The second question:  A Interger is like a "1" ,but a character is like an"A".......sorry,i can not understand the question. PostVer 0

Please login to reply. Login

ikarososohucom • 2017-10-19 21:42:34
QUESTION ONE

Normally,we human use decimal system,but it is hard for us to find a device that can represent 10 different stable signals.But binary system is different, many devices can represent two different signals.Such as a switch, it has ON and OFF.D<i>iode, it can be conducted or not conducted.As far as google tells me ,computer distinguish 0 and 1 using  low or high voltage.And from  ZHIHU ,I also find some advantages of using the binary system.Here is the picture.<a href="http://www.yvsou.com/wp-content/uploads/sites/30/2017/10/捕获.png" rel="nofollow"><img class="alignnone size-medium wp-image-3805" src="http://www.yvsou.com/wp-content/uploads/sites/30/2017/10/捕获-300x191.png" /></a></i>

&nbsp;

QUESTION TWO

Computer stores integer and character using different size of memoories.For integer,normally it is 4 Bytes but for character , it is 1 Byte.So, we can distinguish integers and characters by compare the memory they occupy.

&nbsp; PostVer 0

Please login to reply. Login

typeme3163com • 2017-10-19 23:22:09
Because the computer is created by digital circuit,and it only has tow states. (0,1) is the best way to represent information.

The characters use binary to storage,the Intergers use ASCII to storage. PostVer 0

Please login to reply. Login

1033415679qqcom • 2017-10-19 23:53:05
Answer1:Firstly,computers consist of lots of logic circuits which have only two states,0 and 1.Secondly,computers can directly identify 0 and 1 two digits and work more efficiently.

Answer2:We represent intergers and characters separately by int and char.

&nbsp; PostVer 0

Please login to reply. Login

495162647qqcom • 2017-10-23 23:06:02
Cause every computer is made up of many electronic components. We use the "on and off"of those electronic components to represent information. if we insist on storing it as encoded symbols in ASCII using one byte per symbol,we need a total of 16 bits.Moreover, the largest number we could store using 16 bits is 99.However, by using binary notation we can store any integer in the range from 0 to 65535 in these 16 bits.

Size of integers is 4 bytes while size of characters is 1 byte. PostVer 0

Please login to reply. Login

929165572qqcom • 2017-11-02 20:22:47
Because computer is not like human,it is a digital electronic device,so when current passes through,it could be 1;no current means 0.

It's easier for computer to understand and executive operation.

Judge each string of the ASCII value, if it is between 0~9,so it's a string.Or it's intergers. PostVer 0

Please login to reply. Login

ikarososohucom • 2017-11-12 16:32:29
123123 PostVer 0

Please login to reply. Login

karabalinakarinaicloudcom • 2017-12-25 14:36:18
<!--more-->1)For the computer using binary is very convenient. In the reality there are so many things which use only two different ways to represent information . For example, switch, which turns ON and OFF the light. So the computer use only two states 0 and 1 for low and high voltage respectively , to simplify and represent information more easier .

2) String has '\0' at the end of the characters but the integer does not have it. PostVer 0

Please login to reply. Login

karabalinakarinaicloudcom • 2017-12-25 14:48:00
H PostVer 0

Please login to reply. Login

Reversion History

Loading...
No reversions found.