+ 46

We know that executable code appears in a binary number (0's and 1's) format....Here is my doubt arise...[Question related to C]

We know that computer,an electronic device[made by more than millions of transistors] which won't able to work with simple [0's and 1's] binary number data alone... i.e Computer won't able to work and process data without electricity..... It should convert that 0's and 1's binary numbers to voltage levels like off[0- 0.5v] && on[5v] Because then only transistor able to work..... But I don't know how does the computer convert, raw data[0's and 1's] binary numbers outputted by the Compiler to its particular voltage levels...... Which part in computer do this work? Hardware or software[OS && Compiler]..... And how does it do it..... Please explain me .... /* ------------------------------------------------- If you find any difficulty for understanding my question,then please visit the comments section of this question.... It helps to know you, what I want... --------------------------------------------------*/

8th Nov 2020, 6:07 AM
Yogeshwaran P
Yogeshwaran P - avatar
26 ответов
+ 42
Yogeshwaran Here are more links that take a closer look at ALU Digital Circuits with logic gates from both a conceptual and physical understanding: How Computers Calculate: the ALU Crash Course Series #5: https://youtu.be/1I5ZMmrOfnA From this Playlist: https://www.youtube.com/playlist?list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo And Website: https://computersciencewiki.org/index.php/Functions_of_the_arithmetic_logic_unit_(ALU)#:~:text=An%20arithmetic%20logic%20unit%20(ALU,a%20control%20unit%20(CU). Digital Circuits: https://learnabout-electronics.org/Digital/dig58.php Learn by Building a Discrete 4-bit ALU: https://www.allaboutcircuits.com/projects/how-to-build-your-own-discrete-4-bit-alu/ Results Video: https://youtu.be/GML6WQbNhCE Hopefully, you'll get your answers to this question after reviewing all of this great material and realize why it's not a simple answer without us knowing more about how much you currently understand already.
8th Nov 2020, 8:09 PM
David Carroll
David Carroll - avatar
+ 38
Yogeshwaran I've also challenged myself over the years to get a deeper understanding of how this works and I can say it will be an investment of time and commitment to building up a lot of fundamentals in CS and understanding electrical circuits, and thinking abstractly at an atomic level when it comes to thinking through gate logic in microchips and nano silicon transistors. The answers from both Jan Markus and Martin Taylor are brilliantly concise, but may not register without proper understanding of the fundamentals. In fact, you'll want to try to bring it back to some of the earliest microchips when trying to mentally track the moving parts involved and needed to understand this. I highly recommend the following videos in the order listed: Relevant and Quick Summary on Transitors with CPUs: https://youtu.be/OwS9aTE2Go4 ---- Ben Eater: Brilliant series that first implements simple program using physical circuits with a 6502 kit, then rebuilds using programs written via EEPROM. https://eater.net/6502
8th Nov 2020, 7:56 PM
David Carroll
David Carroll - avatar
+ 24
hossein B It's actually a good effort and certainly reflective of how difficult it can be to summarize without compromising accuracy when over simplifying complex key concepts. 👌 To help further piece together some key concepts, start by revisiting half way into the video below. It provides a great visualization of building electric circuit flow based on the input of two bit values in a logic gate to produce a resulting bit value. The initial values of on or off are based on reading the bit inputs from the register. https://youtu.be/OwS9aTE2Go4 I also highly recommend this video: How a CPU Works: https://youtu.be/IkdBs21HwF4 - It starts to address what you're looking for at about the 2 minute mark and gets into more details at about 3 min 6 sec. And this article this article builds on the video: https://irisxzy.wordpress.com/2016/10/01/cpu-alu-cu-and-registers/ Then this goes even deeper: http://users.ece.utexas.edu/~valvano/Volume1/E-Book/C4_DigitalLogic.htm
8th Nov 2020, 11:43 PM
David Carroll
David Carroll - avatar
+ 16
Integrated circuits within the CPU and RAM contain millions of transistor and other elements. In DRAM, a transistor/capacitor pair is used to hold electric charge which can be abstracted as a voltage to hold one bit of information. In SRAM, a group of transistors is used to represent a bit. As a computer program can be several MB or Mb in size, several millions of such elements within the integrated circuitry in a computer's memory will be required to hold the binary executable that results from the output of a compiler.
9th Nov 2020, 6:14 AM
Sonic
Sonic - avatar
+ 16
Sonic Nice supplemental info... CMOS could be added to your list as well: Complementary Metal-oxide Semiconductor
9th Nov 2020, 6:41 AM
David Carroll
David Carroll - avatar
+ 15
Jan Markus I've been a long time fan of this channel... good stuff. 👌
9th Nov 2020, 4:44 AM
David Carroll
David Carroll - avatar
+ 14
Compiled programs also need to be stored in long term storage. In hard drives, magnetism rather than voltages are used to store the bits of data. In SSD drives, again transistors within the Integrated circuitry are used. In CDs/DVDs small pits/depressions are used to store data that can be read via lasers. In tape systems, iron oxide particles deposited on the tape material are used.
9th Nov 2020, 6:32 AM
Sonic
Sonic - avatar
+ 13
Thank you Jan Markus for yours answer😊 can you tell me... 0's and 1's[.executable code] outputted by compiler to OS, is in which format? I mean,it is representing simple binary number || it representing the voltage levels[0v and 5v] ....? Please tell me...
8th Nov 2020, 7:05 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 13
Luckily, humans are capable of working/thinking in several layers of abstraction that there is often no need to think of or go down to the lowest level or first principles except for academic reasons or for a minority group of researchers who need to work with certain low level parameters/layers for reasons such as optimisation or innovation.
9th Nov 2020, 6:21 AM
Sonic
Sonic - avatar
+ 12
Thank you Jan Markus,Martin Taylor and David Carroll for yours answers......😃 It really helps me to understand what going inside the CPU and how does bits converted to voltage levels.... It help me a lot... Once again thank you all for your deep explanation ....😊 And thank you Thomas for appreciating my question.....🙌
9th Nov 2020, 3:44 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 11
The earliest electronic computers used thousands of vacuum tubes for their circuitry but did not use stored programs. In some later models, holes punched into paper cards were used to store data as well as programs. From what I understand, these holes and spaces store character data (e.g. of an assembly language program) rather than binary data.
9th Nov 2020, 6:42 AM
Sonic
Sonic - avatar
+ 9
It's ok Jan Markus 😊..... I also ask this question in google but won't get a proper answer..... So, please share this question to sololearners, who knows answer for this..... Any way thanks for yours effort in answering my questions....🙌
8th Nov 2020, 7:27 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 9
I will surely see that videos....... Thank you Jan Markus ....😊
9th Nov 2020, 3:57 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 9
David Carroll thanks. Yes 😀.
9th Nov 2020, 6:45 AM
Sonic
Sonic - avatar
+ 8
Jan Markus then what happens, after that binary numbers inserted into OS by compiler?😅 I want answer about the "transformation of binary numbers to voltage levels" behind OS || from OS to Hardware...... please answer......
8th Nov 2020, 7:13 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 7
Wow. I have never thought about this question. I knew that binary data was stored as 1s and 0s, but I never thought about what converts it. Nice question.
8th Nov 2020, 6:50 PM
Aria
Aria - avatar
+ 6
Really enlightening question and answers.
9th Nov 2020, 8:57 AM
Daniel Tobi Nyorere
Daniel Tobi Nyorere - avatar
+ 5
Thank you all for answering my question..... With lot of new information..... which I don't know before.......😊 && Thank you all for appreciating my question...... and answering my question🙌
9th Nov 2020, 10:08 AM
Yogeshwaran P
Yogeshwaran P - avatar
+ 4
David Carroll a digital to analog converter should do the trick 😎 sorry for the earlier 📯 post 😅 This is available as a single IC CHIP !!!
9th Nov 2020, 10:05 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 3
Oof 🤦‍♂️ Well... I'm out... If anyone needs me to respond, please be sure to mention me. Otherwise, I won't be receiving notifications as I'm unfollowing the thread.
9th Nov 2020, 10:06 PM
David Carroll
David Carroll - avatar