instruction stringlengths 0 29.8k ⌀ |
|---|
null |
[16 I/O wires diagram ](https://i.imgur.com/j6F15UI.jpg)
I'm looking at this diagram from Ben Eater's "[8-bit computer] (https://youtu.be/QzWW-CBugZo)" tutorial
Why not use only 8 wires for both input and output to the bus?
[8 I/O wires diagram ](https://i.imgur.com/mnhMOYh.jpg)
|
Why do these registers use 16 I/O wires for input and output to the bus? Why not use 8 wires for both input and output? |
|cpu| |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8-bit computer] (https://youtu.be/QzWW-CBugZo)" tutorial
Why not use only 8 wires for both input and output to the bus?
[8 I/O wires diagram ](https://i.imgur.com/mnhMOYh.jpg)
[1]: https://i.stack.imgur.com/FILEb.j... |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8 bit computer][2]" tutorial
Why not use only 8 wires for both input and output to the bus?
[8 I/O wires diagram ](https://i.imgur.com/mnhMOYh.jpg)
[1]: https://i.stack.imgur.com/FILEb.jpg
[2]: https://youtu.be/... |
Why do these 8 bit registers use 16 I/O wires for input and output to the bus? Why not use 8 wires for both input and output? |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8 bit computer][2]" tutorial
Why not use only 8 wires for both input and output to the bus?
[![enter image description here][3]][3]
[1]: https://i.stack.imgur.com/FILEb.jpg
[2]: https://youtu.be/QzWW-CBugZo
[3]:... |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8 bit computer][2]" tutorial
Why use 8 wires for separate data input, and another 8 wires for data output? Why not use only 8 wires for both input and output to the bus?
[![enter image description here][3]][3]
[1]: ht... |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8 bit computer][2]" tutorial
What's the need to use 8 wires for separate data input, and another 8 wires for data output?
Why not use only 8 wires for both input and output to the bus?
[![enter image description here][3]]... |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8 bit computer][2]" tutorial
What's the need to use separate 8 wires for only data input, and another 8 wires for only for data output?
Why not use only 8 wires for both input and output to the bus?
[![enter image descri... |
[![enter image description here][1]][1]
I'm looking at this diagram from Ben Eater's "[8 bit computer][2]" tutorial
What's the need to use separate 8 wires for only data input, and another 8 wires only for data output?
Why not use only 8 wires for both input and output to the bus?
[![enter image descriptio... |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on the previous page, the left recursive ... |
null |
There's a sentence in the current version of the [Wikipedia page for Shor's algorithm][1] which states: *we can use efficient classical algorithms to check if $N$ is a prime power*. No reference is provided to support it.
Is this true? I've tried to look around for such an algorithm but didn't find much.
There is... |
Is there an efficient algorithm to find whether an integer is a prime power? |
|integers|factoring| |
Note that if a number $N$ is a power of a prime $p$ it will be of the form:
$$N=p^i \ ,$$
Since $p$ is prime, $p \geq 2$ which implies $i \leq \log_2 n$.
We can compute the $i$th roots of $N$ for each $2\leq i \leq \log_2 n$ and check if the resultant number is integer, and eventually if it is a prime. The ... |
Note that if a number $N$ is a power of a prime $p$ it will be of the form:
$$N=p^i \ ,$$
Since $p$ is prime, $p \geq 2$ which implies $i \leq \log_2 n$.
We can compute the $i$th roots of $N$ for each $2\leq i \leq \log_2 n$ and check if the resultant number is integer, and eventually if it is a prime. The ... |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
It took me quite a while to figure what the author of the book was pointing out and specifically what you are asking for, but I think I eventually managed to get it.
The author stated that lists are associative, while intuitively this is correct I don't think this is necessarilly a useful thing to know; especially a... |
I have a list of lists T.
I stress test my database software by randomly adding and removing sublists and elements of sublists to/from T and from/to my database. (After this I compare T with the database, because they must be identical, because they underwent the same sequence of insertions/deletions.)
I want the... |
Keeping in a list a list of recent insertions/removal to/from a list of lists |
|trees|arrays|lists| |
I am preparing for an exam in computability and still learning about the idea of reductions. I found an interesting problem to start with and am curious if my approach is correct:
**Let *H0* be the halting problem starting on an empty tape, and let A be a decision problem defined as A ∶= {x ∈ N ∣ x < 10}.
Show or d... |
Reduce A ∶= {x ∈ N ∣ x < 10} to Halting Problem on empty tape |
|reductions|halting-problem|semi-decidability|decidability| |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
null |
If you make a set of subsets out of the edges of a graph and solve the set cover problem, youll have solved the vertex cover problem. This is true for any graph.
If you take a set of subsets,
1. You may not be able to make it into graph.
2. even if you did the vertex cover might not be the set cover. |
null |
As far as I know, the halting problem means we can't create a program that checks whether another program is stuck or halt based on given input. This means, the program expects two inputs and one boolean output.
For example in a Python language, there's program called `is_halt.py` expecting one input integer. Let's ... |
Can halting problem solved by soft computation? |
|halting-problem|python| |
No. ChatGPT is still just a program, although a rather large one. |
null |
An undirected graph $G=(V,E)$ is "evenly connected" if for every $v\in V$ there's a (not neceserally simple!) path to all the other vertices, **with even number of edges**.
Let $G=(V,E)$ be an undirected graph where $3\leq |V|, 2\leq |E|$.
We want the minimal number of edges we need to add to $G$ in order to make t... |
"evenly connected" graph |
|graphs| |
null |
null |
the solution is at least K-1.
In there is that cycle, denote as "d" one of the vertices in that cycle.
Now for every a and b in V, there must be a path a->d->b. If that path has even vertices is ok, else you make one cycle resulting in an odd+odd=even number of vertices.
Note that that cycle is always in the same co... |
the solution is at least K-1.
If there is that cycle, denote as "d" one of the vertices in that cycle.
Now for every a and b in V, there must be a path a->d->b. If that path has even vertices is ok, else you make one cycle resulting in an odd+odd=even number of vertices.
Note that that cycle is always in the same co... |
the solution is at least K-1.
If there is that cycle, denote as "d" one of the vertices in that cycle.
Now for every a and b in V, there must be a path a->d->b. If that path has even vertices is ok, else you make one cycle resulting in an odd+odd=even number of vertices.
Note that that cycle is always in the same co... |
the solution is at least K-1.
If there is that cycle, denote as "d" one of the vertices in that cycle.
Now for every a and b in V, there must be a path a->d->b. If that path has even vertices is ok, else you make one cycle resulting in an odd+odd=even number of vertices.
Note that that cycle is always in the same co... |
Suppose $x_{ij}$ is number of times that word $j$ appears in document $i$. Then the *cosine similarity* between document $A$ and document $B$ is the normalised dot product:
$$\mathit{sim}(A,B) = \frac{\sum_j x_{Aj} x_{Bj}}{\sqrt{\left(\sum_j x_{Aj}^2\right) \left(\sum_j x_{Bj}^2\right)}}$$
This is normalised to b... |
null |
See:
Daniel J. Bernstein. *[Detecting perfect powers in essentially linear time][1]*, Mathematics of Computation 67 (1998), 1253–1283.
Here, "linear" means "linear in $\log N $". Specifically, the complexity is $\left(\log N\right)^{1 + o(1)}$ as $n \rightarrow \infty$.
[1]: http://cr.yp.to/papers/powers-199... |
There's a very similarly [sounding question with an answer already][1], but my setup is very, very different.
You are given $k$ half spaces in dimension $d$, defined by a point and a direction. You want to find all vertices in the polytope if it is bounded, otherwise, you want to close it (i.e. make it bounded), the... |
Algorithm for computing the vertices of a polytope defined as the intersection of half spaces |
|algorithms|computational-geometry|linear-algebra|graphics| |
In section 3.7.1, of the book titled: Compiler design in C, by Allen I. Holub (made available freely online, by the author [here][1], & the page #19 of errata, [here][2]), have on page #176, the mention of grammar, for a right-recursive list:
stmt_list -> stmt stmt_list | stmt
stmt -> A | B| C
while on t... |
null |
One common misconception about the halting problem is that it is totally possible to make a program that will determine whether some (most?) programs halt. However if you give ChatGPT (or any other program) harder examples things will inevitably break down very quickly. |
The halting problem does not mean that it is impossible to tell if a particular program halts or not. For example, any loop-less program will terminate, and it is a very easy matter to check the absence of loops. The halting problem says that no algorithm can work for *any program*.
A human could do better than an a... |
The halting problem does not mean that it is impossible to tell if a particular program halts or not. For example, any loop-less program will terminate, and it is a very easy matter to check the absence of loops. The halting problem says that no algorithm can work for *any program*.
A human could do better than an a... |
null |
null |
I'm making a web application that can generate a unique unsigned Int32 post IDs for posts. Normally I would just make it auto-increment from `0`.
But I don't want the user to "guess" what's the next ID will be from their own post ID. So I would like the sequence to be random. Let's say the very first post has the ID... |
Is there an algorithm to remap every Int32? |
|algorithms|encryption| |
I'm making a web application that can generate unique unsigned Int32 post IDs for posts. Normally I would just make it auto-increment from `0`.
But I don't want the user to "guess" what's the next ID will be from their own post ID. So I would like the sequence to be random. Let's say the very first post has the ID o... |
> As far as I know, the halting problem means we can't create a program that checks whether another program is stuck or halt based on given input.
No, the Halting Problem means that we can't create a program that checks for *all possible programs* and *all possible inputs* whether the program will terminate for that... |
If you don't need a cryptography-proof solution, xor with a 32 bits number, then scramble the bits. This is easy to invert.
|
I am currently reading the Crafting Interpreter book and I have a question about the [Resolving and Binding chapter](https://craftinginterpreters.com/resolving-and-binding.html)
The author gave this example to illustrate the problem with the implementation at that point in the book.
```
var a = "global";
{
f... |
How are closures supposed to interact with variable binding and resolving? |
|variable-binding| |
null |
I have been studying the polynomial hierarchy recently, and I came across an intriguing claim that I would like to explore further:
Assuming co-$NP\subseteq NP\text{/}P$, the claim states that it implies $\Sigma_3^P=\Pi_3^P$, which, in turn, leads to the conclusion that $PH=\Pi_3^P=\Sigma_3^P$.
I find this claim ... |
Prove the collapse of polynomial hierarchy $PH$ given co-$NP\subseteq NP\text{/}P$ |
|complexity-theory|np|circuits| |
Investigating the Claim: co-$NP\subseteq NP\text{/}P$ implies $\Sigma_3^P=\Pi_3^P$ and Collapse of the Polynomial Hierarchy? |
I had been reading about File systems recently and came across the File Allocation Table in FAT systems. As per my understanding the File Allocation Table contains entries of the various files stored in the partition. This includes things starting cluster, ending cluster, file name etc (I still didn't understand exactl... |
Where is File Allocation Table in FAT32 file system stored? |
|filesystems| |
Consider the following variation on the Interval Scheduling Problem
You have a processor that can operate 24 hours a day, every day. People
submit requests to run daily jobs on the processor. Each such job comes with a start
time and an end time; if the job is accepted to run on the processor, it must run
continuou... |
Proving the correctness of a greedy algorithm for the Circular Scheduling Problem |
|algorithms|algorithm-analysis|proof-techniques|greedy-algorithms|intervals| |
regular ANS collects all the data into one big integer and provides optimal compression. In cases where all the symbol probabilities are powers of two, it is just as good as huffman coding (because huffman coding is also optimal in this case).
Streaming ANS lets us avoid the need to use a BigInteger or other expensi... |
Is it possible to avoid encoding the state in streaming ANS? |
|information-theory|data-compression|entropy|huffman-coding| |
null |
Your algorithm is not correct.
Consider intervals [1,7], [8, 14], [15, 21], [22,28], [13,16], [2,9], [3,10], [4,11], [17,23], [18,24], [19, 25].
Your algorithm chooses [13,16] first, as it only overlaps with two other intervals. Then it will only be able to choose two more non-overlapping intervals; one ending be... |
null |
null |
One can read it easily if one has
1. A solid background in highschool math (algebra + geometry)
2. A calculus course
3. Discrete mathematics book completed
4. Concrete mathematics completed
5. Ability to write code in one language like python, test yourself by solving first 25 problem from project Euler, if you ... |
I want to implement a delaunay triangulator by using incremental building, which is purported to be $O(n \log(n))$ I am a little puzzled about 2 things.
Ever resource I read on the matter says:
1) Make 3 points that are large enough to contain all other points.
2) For each point, find the face that contains it, ... |
Efficiently finding point triangle inclusion when doing incremental delaunay triangulation? |
|graphs|computational-geometry|discrete-mathematics|triangulation| |
I'm looking for the most efficient way of solving an [Levenshtein edit distance][1] problem.
We are given as input:
> 1. A set of strings `S` of size `n` <= 8, with average length `m` <= 50
> 2. A target string `t` of length `l` <= 50
Our task is to 'align' `t` with `S` i.e:
> Find the subset `s*` of `S`, wh... |
Finding the subset of a dictionary that has the minimum edit distance to a given string |
|algorithms|dynamic-programming|strings|string-matching|edit-distance| |
Isn’t your problem simply: given a list of points $L$, create 3 new points such that all points in $L$ are enclosed by the triangle formed by the new 3 points?
If so, that can be done in linear time quite easily. For example if $b, t$ are the minimum and maximum $y$-coordinates in $L$ respectively, and $l, r$ are t... |
null |
The first five fields of the BPB (BIOS Parameter Block) in any FAT filesystem contains are following fields:
* The first three bytes are the boot jump; this contains `EB 3C 90` (the `3C` may be different), which is 8086 machine code to jump over the disk format information for convenient booting.
* The 8-byte OEM i... |
null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.