r/AskComputerScience • • Mar 06 '22

In binary 1 represents the existence of electric flow and 0 reps the none exists of it. Theoretically does sending information that contains more 0s than 1s will consume less power?

31 Upvotes

r/AskComputerScience • • Jan 04 '22

Where is the theory around automata actually useful in practice?

31 Upvotes

in all my many many hours of coding, consuming programming content and talking to other devs, i don't remember ever coming across a single mention of automata. Yet they take up a quarter of my high schools entire two year programming class. Are they actually useful enough to justify this time investment? they seem like little more than flow charts to me at this point. am i just being ignorant? i'd love to know where they appear in practice, even if it's just so that i can motivate myself enough to participate in the class. any hints appreciated.


r/AskComputerScience • • Dec 04 '21

My 9 year old is teaching himself how to make game mods and wants to learn how to make them from scratch. What can I do to help him?

31 Upvotes

I work in an IT background, so I’m not completely oblivious when it comes to this, but I’m absolutely not into programming outside of cmd/powershell scripts on a simple case by case basis, so I don’t know the fine details of it. I’ve always provided my kids with current tech and PC’s, one because I’m a nerd, and two because I feel that them learning as much as they can about todays technology will help them in the future. Just earlier I found my son with multiple text editors open trying to create his own mods and worlds in Minecraft and roblox, and reading about how to do what he wants with it. He showed me a couple of things he was working on and it’s very obvious that he has put a LOT of time into this, has a strong understanding of what he is doing, and done some things that I’d have to work on for days to accomplish. Are there programs or online classes he could make use of that would help him learn or do what he is trying to accomplish and nurture this along, while maybe developing it into more advanced programming languages?


r/AskComputerScience • • Oct 04 '21

Facebook is down right now -- but why does trying to reach it fail with a DNS error?

31 Upvotes

Chrome says:

This site can’t be reached

Check if there is a typo in www.facebook.com.

DNS_PROBE_FINISHED_NXDOMAIN

But DNS is separate from FB.

All I can think of is that FB removed their entry from worldwide DNS until their problem is fixed.


r/AskComputerScience • • Jul 10 '21

How much faster is C compared to Python? I'm currently coding a SAT solver algorithm that will have to take millions of input data, and I was wondering if I should switch from Python to C.

31 Upvotes

I'm currently coding a SAT solver algorithm for an internship, but right now it's only able to handle inputs of 10^5 within reasonable time (over 100 of iterations, this is so we can gather statistical data on the algorithm). However, from 10^6 and after, my Python code bottle necks and takes a long time to finish. My professor suggested that I port the code over to C, but when I try doing that there are a lot of small things that make it difficult to port. For example, I need to be able to randomize an array size for a structure that's in a header file, but you can't do this in C (well, I don't need to do this exactly, but other methods will be a bit harder to code and look sloppier). I was wondering if the bottleneck I mentioned above will be reduced drastically if I switch over to C, especially for inputs of 10^8. I know this depends on the complexity time of the algorithm, but I was wondering if porting the code will be worth the headache because I'm pretty sure that my python code is the same time complexity as my professors pseudocode. I thought of using pypy and Numba, but they only speed up 2x to 4x, which is still slow, especially when inputs will be 10^8 or 10^9. I was also thinking of trying to use Go, although I never used that before. Thank you in advanced!


r/AskComputerScience • • Apr 08 '21

I have three questions regarding computers: 1. How do 8-bit computers have more than 256 bytes of RAM, 2. How does an 8-bit computer display pixel on a monitor, and another question about operand/op-code logistics

31 Upvotes

Hello Everyone, I am learning about computers and have a few questions about 8-bit computers (inspired by learning about the Commodore's).

Question 1:

How does an 8-bit computer have more than 256 bytes of RAM? because 8 bits can only have 256 combinations, the memory addresses must only have around 256 bytes, considering that 8-bit computers can only have 256 possible memory addresses for each byte of RAM.

If this isn't true, how does it really work, and if it is true, how do/did 8-bit computers get around that? (such as the commodore 64 having 64kB of RAM, and 20kB of ROM).

Question 2:

How do computers (focusing on 8 bit, but all computers) display pixels on a screen. After watching some videos and reading some books, I learned that the computer outputs the letter or number to the display, but how does that monitor know where to go, how big, and how far apart each character is? Is it the monitor doing the work or the computer, and if it is the monitor how does the monitor deal with different clock speeds?

Question 3:

I learned that computer instructions are split up in two ways:

  1. in an 8 bit computer, the first four bits are op-codes, which get passed through a decoder, and the last four bits are the operand, (eg: STORE | 14 == 1010 | 1110)

  2. (according to another video I found) all 8 bits are the op-code, then the next instruction to pass through is the operand, (eg: STORE | 10110100 then 14 | {0010}1110)

^ that storing the number as an integer

The first one I understand, but the latter I do not. How does the computer remember that the next byte is meant to be an operand instead of an instruction, or an instruction instead of an operand?


r/AskComputerScience • • Apr 04 '21

What is actually going on when you"install" software on a computer?

31 Upvotes

Pretty much the title. When you download a piece of software (or bought the cd if you're old enough to remember doing that) and it has to be installed, what is the computer actually doing? I know the files have to be copied over into the drive, but what else is being set up/done by the computer to install the software?


r/AskComputerScience • • Feb 14 '21

Is there any value on online Computer science degrees?

31 Upvotes

I have a bachelor in Industrial engineering and thinking of getting an online masters in Computer science and I found great prices when I was looking in Coursera. But would it have any impact of getting chances in getting hired?


r/AskComputerScience • • Feb 01 '21

How to expand knowledge other than university?

31 Upvotes

I'm close to completing my BSc in CS and I'm trying to look for a job when suddenly it dawned on me that I eventually want to have a job that involves applying math as opposed to web development, app design and in some cases video games.

My question is: if I don't pursue a master's degree, how should I go about learning things like cryptography, graphics or machine learning? The end goal being to also eventually use the knowledge to make a living.


r/AskComputerScience • • Jan 27 '21

Can someone explain to me how to get the time complexity for those two functions? I tried to narrow down the solution as much as I can but I couldn't find the answer. Mostly with the second one

Post image
31 Upvotes

r/AskComputerScience • • Nov 22 '20

Why do we need Rosetta when changing from Intel to M1 chips if applications nowadays are written in high level languages?

31 Upvotes

From my understanding, high level languages are compiled into machine code readable by the chip. Why do we need to translate things on the fly with Rosetta if we can just take the source code of the application and just recompile it for the new chip? Let me know if I’m missing something here.


r/AskComputerScience • • Jul 01 '20

Why graphs?

31 Upvotes

So, in a lot of my programming classes at my university, we have discussed graphs. Graphs, in this context, are collections of nodes connected by “edges” (or lines). Why do we talk about graphs so often? Are graphs useful in computer science? If so, what are they used for?


r/AskComputerScience • • Jun 29 '20

How to prepare for data structure and algorithms interview?

31 Upvotes

Hi there,

I am preparing for a technical interview in python. What should be my strategy be like.

How did you prepare for your technical interview? How can I make it more efficient? How many problems should I try to solve in a day? After how long being stuck should I look for solutions?

Thanks in advance.


r/AskComputerScience • • Jun 22 '20

How will ARM based MacBooks change developer preferences when it comes to CS related work?

31 Upvotes

Will they become bad for everyone but iOS and Mac devs? I wasn't initially too concerned, but today a report came out that the first ARM Macs might be MacBook Pros, and that the Intel ones will be discontinued after the ARM ones are introduced. Obviously, a rumor, but I wanted to know what people think about this development.


r/AskComputerScience • • Jun 16 '20

Public DNS sinkhole to block ads

31 Upvotes

Hi Reddit

I just found out about pi hole, which is a DNS sinkhole you setup on your LAN so that ad-related DNS requests don't get resolved. If you have this, no device in the network gets advertisements (more or less anyway) for any app. It uses a community-managed list of which requests are ad-related and which aren't.

I'm wondering why such a DNS sinkhole does not exist as a public service. I could simply create a public DNS server that uses the community-managed lists of the pi-hole and then set this server's IP as my DNS server on my devices. Then, wherever I go or whatever network I'm connected to, I have no advertisements.

I can't be the first person to think of this, yet I found no mention of this anywhere online. Can I go ahead and set this up myself, or is there something wrong with this idea?

Thanks!


r/AskComputerScience • • Nov 11 '19

Why isn't Intel/TSMC/Samsung using x-ray lithography?

31 Upvotes

I don't know what I'm missing. We have the ability to do x-ray lithography with a 2.9 nm nitrogen plasma or something smaller, but instead fabs are all migrating to EUV lithography with a 13.5 nm tin plasma.

This occurred to me again today when I was watching this video:

https://youtu.be/3eTogq7rknQ?t=1376

Around the 23 min. mark Mike Campbell says:

All integrated circuitry is done with lasers. Actually, now it's using x-rays made with laser-heated matter.

I mean, that's the way it seems like it should be done, but even if he has a new 2019 phone with a 7 nm A13 or Snapdragon 855 it's still made with EUV lithography.

The spectrum goes visible => ultraviolet => x-rays => gamma rays

DUV = Deep Ultraviolet lithography (193 nm ArF excimer laser)

EUV = Extreme Ultraviolet lithography (13.5 nm CO2 laser–Sn plasma source)

EUV goes down to 10 nm, and soft x-rays are 10 nm down to 0.2 nm.

X-ray lithography can be done several ways:

3.5 nm krypton laser-plasma source
2.9 nm or 2.5 nm nitrogen laser-plasma source
2 – 0.2 nm (2Å) synchrotron source

...and e-beam sources which I think have several wavelength options are used in x-ray lithography.

Intel's 10 nm node uses DUV lithography, and they're switching to EUV lithography in 2021 for the 7 nm node. Maybe they're being sneaky and they'll actually switch to x-ray?

Samsung/TSMC have already started using EUV. For the foreseeable future (down to 3 nm in 2023) everybody is using EUV lithography.

It sounds like EUV — especially with advances in faster Inverse Lithography (ILT) — can keep going for several generations.

And I keep hearing that quantum tunnelling is the big issue that's going to make die shrinks impossible, but then those problems always seem to get solved. For example, GAA FETs solve quantum problems at the 3 nm node.

Eventually they'll be using x-ray lithography because they'll have to. Because physics. Then they'll use a plasma source with a higher wavelength than tin and they'll call it XRL instead of EUVL.

But why not do it now? Why move to EUV in the first place?

Retooling to a different wavelength source is a big expense, but then you can go for several generations with the same light source, so why is everybody retooling for EUV instead of going straight from DUV to XRL?

For example, DUV uses the same 193 nm excimer laser used in LASIK procedures. That's a good wavelength, because when you go shorter than 193 nm you have to pump the oxygen out of the room because oxygen likes to absorb UV <180 nm. So I assume if you're using a 13.5 nm EUV source you've already solved that problem.

Most of the 'innovation' I see — and the struggles I hear about them overcoming — have been related to trying to make 10 nm features with a 193 nm laser. It sure seems like they'd be making their lives a lot simpler by using x-ray lithography and eliminating the need for all that.

Thinking about all the effort being put into multiple patterning makes me wonder why they wouldn't just switch to XRL. LELE double-patterning. SADP with spacers. Now Intel is using quad-patterning with spacers, and Samsung is doing LELELE patterning! Doing everything 3 times is such a waste of time and money. Does Samsung just want 7 nm bragging rights?

People have apparently been experimenting with x-ray lithography for over 30 years, but we're not bothering to use it for much. I think I saw that in the 1990s it was being used to make parts for uranium enrichment.

I see papers back to 1990 talking about XRL for 4.5 nm and smaller:

https://www.sciencedirect.com/science/article/abs/pii/016793179090122A?via%3Dihub

And here's one from 1992 which specifically talks about XRL for large-scale manufacturing:

https://avs.scitation.org/doi/10.1116/1.585945

I found tons of papers from the early 1980s about laser-plasma sources for x-ray lithography. This one is from 1978:

https://ui.adsabs.harvard.edu/abs/1978SPIE..135...46N/abstract

But ... again, most of the 'innovation' I see, and the struggles I hear them overcoming in lithography are related to trying to make 10 nm features with a 193 nm laser. It sure seems like they'd be making their lives a lot simpler by using x-ray lithography!


r/AskComputerScience • • Oct 30 '19

Okay but seriously, how does a passionate computer addict turn code into a legitimate program?

31 Upvotes

This is so difficult for me, I code something in any language and it stays in the console. How do I get my game idea out of a console and test it on my phone? I’m beginning to think I’m missing out on an entire category of software development, and that I have a learning disability.


r/AskComputerScience • • Sep 03 '19

How to get started with learning Assembly Language?

31 Upvotes

Greetings,

I am a CS student and am on summer vacation. I was thinking of using this time to learn something new and am interested in assembly (as it also will be a part of my career later on as well).

The problem is that I'm having trouble getting started with it i.e: choosing an architecture and mainly finding learning material such as books, documentation, courses, forums etc. If anyone could give me some advice and general direction, I would be very thankful.

Regards,
Abraxas


r/AskComputerScience • • Aug 27 '19

Why don't my random numbers look random?

31 Upvotes

Hi there,

I have alternately created positive and negative random numbers between -1 and 1 using the Excel Rand() function. When I add all random generated numbers up, I get a sum of more than 620 after 500k steps, whereby the strong upward trend after 100k steps is especially surprising to me.

How could this be explained?


r/AskComputerScience • • Jul 26 '19

How do you move your development environment, tools, etc when changing laptops?

31 Upvotes

I'm coming to the realization that I've invested nearly 50+ hours getting my dev environment perfect. From setting environment variables to proper installations of dozens of programs/tools. Any advice on how to maintain my dev environment when switching devices? Is it advisable to clone my setup to a drive? Or is it more professional/generally accepted to simply start fresh? I am using Windows 10, but welcome advice for *nix environments as well.


r/AskComputerScience • • Jul 21 '19

What percent of 10kb files are valid JPEGs?

31 Upvotes

Sorry if this is the wrong sub, since it's a math-heavy question, but I couldn't find a sub that I thought was better suited.

My question is this: if I had every possible 10kb file, whose binary encodings range from all-0s to all-1s, what percent of them could be opened by a JPEG algorithm, and would not be rejected as a "corrupted" file?

I know a bit about the process of JPEG encoding process, but couldn't figure a way to even ballpark the number.

Edit: I figure the answer will be a very small percentage. Let's say that, for sake of argument, we concatenate onto the start and end of every file the appropriate header and footer signatures, but don't count them in the length of the file.


r/AskComputerScience • • Feb 18 '19

Why does O(n) is equivalent to O(100000000000n) this is counterintuitive for me.

31 Upvotes

r/AskComputerScience • • Jan 08 '19

What specific concepts in CompSci will most people believe aren't true?

31 Upvotes

Hi, I am starting to write a non-fiction book, whereby I attempt to provide convincing rebuttal to 100 science and engineering concepts which almost everybody will initially not believe. That is, I want to get the reader to change their mind 100 times in one book. Some of this will be via reviewing the most popular misconceptions. And some of it will be new knowledge that people will initially think "that can't be true".

Can you think of any theories, concepts, laws which people wont believe upon hearing, or are already 'ubiquitous misconceptions'? Here's the physics thread. Again, not just looking for interesting facts; looking for true things in Computer Science that most regular people will first believe aren't true.

Here are a few ideas for example related to engineering:

To catch up with a space station in orbit, a satellite firing rockets prograde will move further away. It will initially have to fire its engines retrograde to drop to a lower orbit.

It takes more specific energy to get to the sun than to the far planets. You do not 'fall in' at all like one would expect.

Supersonic diverging nozzles make flow go faster.

Subsonic pipe restrictions make velocity go up but pressure go down.

If you had a house with freezing outside air temperature, and access to a big hot rock, in principle you would be better off using the rock to run a heat pump to move heat from the outside cold air to the warm inside of the house.

An open fridge will make a room hotter.

A helicopter pitching forward will have to increase its relative lift to the side, not at the back of the rotor. The FAA says it's at 90 degrees as one would expect from dynamics (but there is some debate about whether it is less than 90).

If you could shrink to the scale of a bacterium and physically be fine, you wouldn't be able to swim in water. It'll be like super thick honey.

An ant scaled to a human would be not be able to carry any weight (let alone 50 times). It would collapse and die, as stresses are carried through an area, and volume grows faster than area.

You can accurately measure altitude with a couple of clocks (due to General Relativity).


r/AskComputerScience • • Aug 13 '18

What's the point of MAC addresses when devices have a private IP address

31 Upvotes

You can also change both your IP and MAC address, right? It seems like 2 things that have the same purpose.