gandalf61
  • Member for 2 years, 8 months
  • Last seen more than a week ago
Essential difference between Assembly languages to all other programming languages
Accepted answer
9 votes

The two most obvious characteristics of an assembly language are: It is specific to a particular CPU architecture. There is a one-to-one correspondence between assembly language commands and machine ...

View answer
Chinese room test vs Turing Test
Accepted answer
4 votes

The Turing test and Searle's Chinese Room argument represent two alternative definitions of intelligence. The Turing test is based on the assumption that intelligence is difficult to formally define ...

View answer
Have computer scientists proven the world is fundamentally unpredictable?
3 votes

You are correct - there are many logical gaps and over-simplifications in the passage that you quote. To unpick just some of them: "Every aspect of the world is fundamentally unpredictable. Computer ...

View answer
Can most programs (except the IO part) be re-written as a sequence of matrix operations?
3 votes

If you regard the output of a program as a function of its input then matrices can be used to represent some programs, namely those where the output is a linear function of the input. So a program ...

View answer
How can any non-primitive-recursive function like the Ackermann function be implemented on hardware?
3 votes

The phrase "The Ackermann function isn't implementable with for-loops" is shorthand for "The Ackermann function $A(m,n)$ cannot be implemented using bounded for-loops where an upper bound on the ...

View answer
How does the computer know whether an address contains an instruction to be executed, or data to be used in an instruction?
3 votes

A full answer to this question depends on the underlying computer architecture, as well as on layers of protection that the operating system may add on top of the basic architecture. In the Harvard ...

View answer
Is CPU Registers part of Primary Memory?
3 votes

CPU registers are often counted as part of primary memory (since they are directly accessed by the CPU - see Wikipedia) and are often volatile, so it seems likely that the expected answer is (1). ...

View answer
How is an Assembly Language Processed by a CPU's Circuitry?
3 votes

An assembler is a program that reads assembly language commands and translates then into a sequence of binary instructions, addresses and data values that is called machine code. The machine code is ...

View answer
How do you convert bits into a different alphabet?
Accepted answer
2 votes

To estimate the number of decimal digits needed to represent a $128$ bit number you use logarithms to base $10$: $128 \times \log_{10}(2) \approx 38.53$ so you need $39$ decimal digits to represent a $...

View answer
How to define enumeration of the set of finite state machines?
Accepted answer
2 votes

One simple encoding is to represent each of the $N$ states by a partial function $f_n:\{0,1\} \rightarrow \{1, \dots, N\}$. Input $x$ in state $n$ will cause a transisition to state $f_n(x)$ if $f_n(x)...

View answer
What algorithm should I use to find the closest solution to a given total using a list of integers?
Accepted answer
2 votes

When packing luggage into a car, you put the biggest items in first and then fit the smaller items around them. By analogy, a heuristic approach to your problem is to start with the member of your set ...

View answer
Would it be possible for a new technology to make RAM obsolete?
2 votes

There is nothing special about RAM. Before electronic computers were invented, mechanical data sorters and tabulators used punched cards as their main (and only) memory. Early electronic computers ...

View answer
Bus and System Clocks
2 votes

In a simple computer architecture with a single active CPU connected to RAM and other passive peripherals by a bus, then there is a timing signal (typically produced by a quartz oscillator) that ...

View answer
How many snakes there can be in the "snakes and ladders" game?
Accepted answer
2 votes

If we assume any given square can be the head or tail (but not both) of at most one snake then clearly an upper limit on the number of snakes on a $n \times n$ board is $\frac {n^2} 2$. For a $m \...

View answer
Why are not programs already in binary code?
2 votes

The short answer to your question is "for productivity and portability". Let me expand on this. The very first generation of computers were indeed programmed directly in binary, either by entering ...

View answer
Human brain vs computer
2 votes

We know that there are problems (like the halting problem) that absolutely cannot be solved by a computer because there is no algorithmic solution. But a human cannot solve those problems either. We ...

View answer
What are the basics of CS i should know,before I start my journey into machine learning
2 votes

Computer science is a very broad subject area, and many of its sub-disciplines have little or no overlap with others. For example, knowing the basics of operating systems design, compiler design or ...

View answer
Prof Knuth's MIX computer - Card Reader and illegal characters
Accepted answer
2 votes

I imagine the concepts developed in the Exercises are meant to be formally part of the MIX specification, but there will also be some degree of arbitrariness. For example, the MIX character set of $...

View answer
How can a 32bit CPU have an addressable memory size of 16TB?
Accepted answer
2 votes

The $32$ bit page frame address acts as a base address and will be typically stored in an index register. An individual machine code instruction (e.g. a branch instruction) will then contain a $12$ ...

View answer
Are computers infallible?
Accepted answer
2 votes

An algorithm may be infallible. Any physical computer can make an error e.g. if it is hit by a stray cosmic ray, a bolt of lightning or a large axe.

View answer
What does "prime" mean in this context?
Accepted answer
2 votes

$h'(k)$ is the value returned by the original unmodified hash function when applied to the element $k$. If the $h(k)$ slot is not free then $h(k,i)$ for $i=0,1,2,\dots$ gives a sequence of modified ...

View answer
How does a computer compute negative(-) and positive(+) Infinity?
2 votes

The simple answer is that a computer that follows a floating point standard such as IEEE 754 does not really compute +/- infinity at all. Instead it treats it as an exception - a special case. ...

View answer
How can the initial "booting" state of a computer be different at different time points?
Accepted answer
2 votes

Can anything change in a computer without the user modifying something, also while not having internet connection? Yes, definitely - computers update their own states all the time, and some of these ...

View answer
Why does arithmetic left shift of negative number leads to positive number?
Accepted answer
2 votes

$01100 \Rightarrow +12$, not $+24$. And it is $+12$ because $32-20=12$. With $5$ bits and $2$s complement you can only represent numbers in the range $-16$ to $+15$. You have overflowed this range ...

View answer
How can we find a palindrome within a string?
Accepted answer
2 votes

Of course, every letter is a one letter palindrome - so let's assume you are looking for a palindrome that is at least two letters long. If your goal is just to find any palindrome in a string $\{a_i\...

View answer
Which memory holds the copy of the program that is to be executed?
2 votes

This is a very ambiguous question. The whole program will be stored on a local hard drive or a remote server or some other secondary storage device such as a flash drive. At run time some part of the ...

View answer
Church Turing thesis
Accepted answer
2 votes

Neither physical computers nor the Turing machine model can exactly represent the value of a continuous quantity or a non-rational transcendental real number. They can, for example, only approximate $\...

View answer
Set of steps that cannot be implemented on a Turing machine
2 votes

When Hilbert set out his famous list of problems in 1900, the tenth problem was posed as follows: "Given a Diophantine equation with any number of unknown quantities and with rational integral ...

View answer
A deterministic FA for $0^*1^*$ is required
Accepted answer
2 votes

To construct a DFA, note the following: An empty string or any string containing only $0$s is accepted, so any $0^*$ is accepted. Zero or more $0$s followed by one or more $1$s is accepted, so any $0^...

View answer
Is the language L = {(a,b)* | #a * #b is an odd number} regular?
2 votes

To find the equivalent regular expression, try this approach. If $\#a$ and $\#b$ are both odd then the total length of the string is even. Divide the string into two character blocks. Each block is ...

View answer