text
stringlengths
1
3.55k
source
stringlengths
24
207
emb
listlengths
1.02k
1.02k
, an assembly language program is a series of instructions that a cpu will execute. however, rather than writing the instructions in a binary format of 0s and 1s, each instruction has a textual name such as β€œ add ” or β€œ move. ” an assembler is a program that translates assembly language source code into machine code. a...
openstax_introduction_to_computer_science_-_web
[ 0.018699886277318, -0.025418372824788094, -0.022236734628677368, -0.0020318294409662485, 0.02748831920325756, -0.03423658758401871, -0.004100922029465437, -0.011588617227971554, -0.028600875288248062, 0.043374598026275635, 0.0024825038854032755, -0.004661488812416792, -0.03808984532952309, ...
nasa spaceflight that first landed humans on the moon. you can examine the assembly code for the embedded computers ( https : / / openstax. org / r / 76assemblycode ) in the space vehicles, which has been released publicly. notice how it is quite low - level, perhaps difficult to follow, and reflects an immense amount ...
openstax_introduction_to_computer_science_-_web
[ 0.005669605452567339, -0.004894137382507324, -0.003858019597828388, -0.006681480444967747, -0.005631252191960812, -0.021408388391137123, -0.010844082571566105, -0.02815946750342846, -0.02106538414955139, 0.030368762090802193, 0.002257488900795579, 0.026805579662322998, -0.016120873391628265,...
4. 1 β€’ models of computation 151 figure 4. 8 as a rule, high - level languages are less laborious to write, and slower to execute, than low - level languages. high - level languages typically do not support direct hardware control. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) middle -...
openstax_introduction_to_computer_science_-_web
[ 0.01612359844148159, -0.022376516833901405, -0.004556228406727314, -0.0031892070546746254, 0.008614747785031796, -0.001418435131199658, 0.0025285622105002403, -0.05705789849162102, -0.04470304399728775, 0.05754198879003525, -0.010126248933374882, 0.031174326315522194, -0.006166532635688782, ...
for focusing on fine details such as the activity of individual people and animals. web application frameworks ( e. g., react, node ) are written in high - level languages, principally javascript. a web framework is a special tool for building and managing web applications. some common ones used in web clients are html...
openstax_introduction_to_computer_science_-_web
[ 0.013204465620219707, -0.030295277014374733, -0.0036188666708767414, -0.0031287535093724728, -0.017656493932008743, 0.0042154681868851185, -0.02008076012134552, -0.026960399001836777, -0.027218595147132874, 0.057744815945625305, -0.008575428277254105, 0.008518841117620468, -0.012454012408852...
a precise series of operations that the computer must execute in order. since the computer is told to take specific actions and execute these statements, the language is referred to as β€œ imperative. ” an imperative is an order or command. low - level languages are imperative languages, and middle - level languages, suc...
openstax_introduction_to_computer_science_-_web
[ -0.02516927756369114, -0.02276313304901123, -0.023688998073339462, 0.0013604764826595783, -0.019536327570676804, -0.01371198520064354, -0.02346036024391651, 0.00756885064765811, -0.0265020914375782, 0.056191641837358475, 0.02501044049859047, 0.027727441862225533, -0.057604655623435974, -0....
4. 1 β€’ models of computation 153 imperative steps to evaluate the functions. figure 4. 10 this diagram shows a functional programming example using python. here the function β€œ lambda ” is used to increment the value of x by 1 whenever it is called. ( attribution : copyright rice university, openstax, under cc by 4. 0 l...
openstax_introduction_to_computer_science_-_web
[ -0.007954996079206467, -0.024337485432624817, 0.007689527701586485, -0.004452322144061327, -0.01427918765693903, -0.006025467533618212, -0.032756246626377106, -0.01732536591589451, -0.04759886488318443, 0.058870695531368256, 0.017656991258263588, 0.04127713292837143, -0.015095886774361134, ...
in proper c, all the code sections that involve conditionals and iteration are written with these statements, and goto should not be used. note that the fact that goto is provided as a keyword in the c language relates to the fact that c is a low - level language and programmers at that level are given the choice of us...
openstax_introduction_to_computer_science_-_web
[ -0.00000998377799987793, -0.004418324213474989, 0.017578033730387688, -0.02898380532860756, -0.03481784462928772, -0.03194136172533035, 0.00019027688540518284, 0.007814902812242508, -0.04064199700951576, 0.06274448335170746, 0.029259946197271347, 0.021365582942962646, -0.009244616143405437, ...
value is greater than the value that you entered. " ) ; } } } inside a loop, like β€œ while ”, the statements are executed only if the condition in the loop is true. otherwise, the loop execution terminates, and the compiler moves to the statements after the loop : import java. util. * ; public class main { public static...
openstax_introduction_to_computer_science_-_web
[ 0.0008555121603421867, -0.005994714796543121, -0.007805914618074894, -0.04716518148779869, 0.01703817769885063, -0.035504743456840515, -0.007514634169638157, -0.0037921713665127754, 0.011599484831094742, 0.049923237413167953, 0.03790101781487465, 0.050416186451911926, 0.01416864711791277, ...
4. 1 β€’ models of computation 155 } } there is a substantial upside to making a language structured, and the only significant downside is that it makes the language a bit more high - level. therefore, among programming languages that are currently in widespread use, all the middle - level and high - level languages are ...
openstax_introduction_to_computer_science_-_web
[ 0.01796499267220497, -0.03799968585371971, -0.026791667565703392, 0.010895385406911373, 0.0275415051728487, -0.03202297165989876, -0.018092263489961624, -0.017343273386359215, -0.04361278563737869, 0.06720104813575745, 0.030187634751200676, 0.030016936361789703, -0.025853075087070465, -0.0...
commands that shut down the connection. these procedures use the imperative approach to accomplish their respective tasks, so each function contains a series of imperative statements. 156 4 β€’ linguistic realization of algorithms : low - level programming languages access for free at openstax. org figure 4. 13 this diag...
openstax_introduction_to_computer_science_-_web
[ -0.006542453076690435, -0.02788010612130165, -0.006090917624533176, -0.007134208455681801, 0.010265427641570568, -0.048800721764564514, 0.015858987346291542, -0.01976780965924263, -0.006842672824859619, 0.07964595407247543, 0.03521869331598282, 0.043826524168252945, -0.04381919652223587, -...
a name and age and can receive input commands and respond or print a greeting, as illustrated in figure 4. 14. 4. 1 β€’ models of computation 157 figure 4. 14 the object - oriented use of a robot class instantiates robot objects that have attributes of age, name, and greeting and methods of input ( ), output ( ), and pri...
openstax_introduction_to_computer_science_-_web
[ 0.0019229803001508117, 0.0032680549193173647, -0.012828958220779896, -0.018359137699007988, -0.0009444965398870409, -0.0075220889411866665, -0.008966571651399136, 0.009755181148648262, 0.008733346126973629, 0.04414572939276695, -0.002170770661905408, -0.006041279062628746, -0.011090522632002...
4. 2 building c programs learning objectives by the end of this section, you will be able to : β€’ write c code using fundamental elements of the language β€’ summarize the steps to develop a c program β€’ understand the process to compile and run a c program β€’ describe how linking is used in a c program β€’ understand how to ...
openstax_introduction_to_computer_science_-_web
[ 0.03767291083931923, -0.013220518827438354, 0.02988012507557869, -0.03217671066522598, 0.0053196856752038, 0.013287895359098911, -0.015259785577654839, -0.012869727797806263, -0.03819962218403816, 0.06304752826690674, 0.0013857822632417083, -0.003814759897068143, -0.012363051064312458, -0....
enough to create large, dependable, programs. c is the programming language behind much of the lower - level software that we depend on, including operating systems, language compilers, assemblers, text editors, print servers, network drivers, language interpreters, and command - line utilities. here are some specific ...
openstax_introduction_to_computer_science_-_web
[ 0.021502194926142693, 0.0059807258658111095, 0.013147339224815369, -0.019908705726265907, -0.003119193483144045, 0.017072096467018127, -0.0041653807274997234, -0.029297174885869026, -0.010969404131174088, 0.04885900020599365, 0.02000793069601059, 0.018097899854183197, -0.008833169005811214, ...
4. 2 β€’ building c programs 159 so long means that it is very likely to endure, which cannot be said of newer niche languages. one notable feature of c is the way it handle memory. in a program, we have variables and values. for example, in x = 10, x is a variable and 10 is the value. every value in a program is stored ...
openstax_introduction_to_computer_science_-_web
[ 0.020516550168395042, -0.004595971200615168, 0.03776753321290016, 0.008257050067186356, -0.0049505108036100864, 0.020702894777059555, 0.023524045944213867, -0.022935818880796432, -0.0052939108572900295, 0.03254009038209915, 0.02588186226785183, 0.020058127120137215, -0.009227432310581207, ...
property of portability. unix was designed to work on various hardware architectures, so the c language is not hardware - dependent. the same c code can be compiled and executed on different hardware architectures and operating systems. 3. modularity : modular programming refers to the process of dividing computer prog...
openstax_introduction_to_computer_science_-_web
[ 0.010876781307160854, -0.015822239220142365, 0.01943017728626728, -0.0195879265666008, 0.013151213526725769, -0.004746617749333382, 0.020415058359503746, -0.007262500934302807, -0.030802031978964806, 0.05243904888629913, 0.013315821066498756, 0.026186004281044006, -0.021234871819615364, -0...
manipulating certain memory locations, and c ’ s support for pointers is one of the reasons that it is used to implement kernels and device drivers. 160 4 β€’ linguistic realization of algorithms : low - level programming languages access for free at openstax. org figure 4. 16 a pointer is a variable whose value is anoth...
openstax_introduction_to_computer_science_-_web
[ -0.0006919347797520459, -0.01249289233237505, 0.03409187123179436, 0.007890993729233742, -0.04270371422171593, -0.010542680509388447, 0.054098423570394516, -0.013254682533442974, -0.012052847072482109, 0.046191491186618805, 0.04766453802585602, -0.007314950693398714, -0.009866228327155113, ...
people in a household 4. the number of dollars in a bank account high - level languages usually check array indices at runtime, which makes out - of - range bugs easy to identify and fix, but slows down array subscripts slightly. as a middle - level language, c does not check array indices. an array is a storage space ...
openstax_introduction_to_computer_science_-_web
[ -0.016856763511896133, -0.011146423406898975, 0.017240023240447044, -0.028026359155774117, 0.021072890609502792, -0.039835043251514435, 0.0297541581094265, -0.042572613805532455, -0.012690398842096329, 0.09390813112258911, 0.048865217715501785, 0.0288251806050539, -0.023866597563028336, -0...
4. 2 β€’ building c programs 161 in c, an invalid array subscript will access memory outside of the array variable. if the subscript is only out of range by a little bit, this will access nearby variables, which is a subtle bug that may go unnoticed. a segmentation fault ( β€œ segfault ” for short ) occurs if the subscript...
openstax_introduction_to_computer_science_-_web
[ -0.018718700855970383, 0.014736060053110123, 0.02404601126909256, 0.033586956560611725, -0.011827100068330765, -0.0179312564432621, 0.04407734423875809, 0.0010614567436277866, -0.002316972240805626, 0.08132152259349823, 0.010038667358458042, 0.029313871636986732, -0.0059344712644815445, -0...
a given device may be indicated as a null / uninitialized pointer, which is fine as long as the program checks for un - initialized pointers to determine if a given functionality is available. however, in general, the freedom of using null / invalid pointers comes with a responsibility to ensure that pointers are alway...
openstax_introduction_to_computer_science_-_web
[ -0.0036579067818820477, -0.018620731309056282, 0.024812649935483932, -0.006696270778775215, -0.011834113858640194, -0.027013186365365982, 0.033275503665208817, -0.009719638153910637, -0.008584919385612011, 0.07436909526586533, 0.053870201110839844, 0.013008184731006622, 0.026307055726647377,...
. programmers working with compiled languages, including c, generally work using the cycle shown in figure 4. 17. 162 4 β€’ linguistic realization of algorithms : low - level programming languages access for free at openstax. org figure 4. 17 a typical work cycle includes multiple compilation steps after a program has be...
openstax_introduction_to_computer_science_-_web
[ -0.01119584497064352, -0.0012597092427313328, 0.017061693593859673, -0.05258648097515106, 0.016694674268364906, -0.0372941680252552, -0.007725086063146591, -0.02066618949174881, -0.010272865183651447, 0.0648045465350151, -0.010112217627465725, 0.014963229186832905, -0.00040266290307044983, ...
debug the code and fix the semantic error. eventually, after thorough testing, which requires a specific approach not described here, no more semantic errors can be found, and the code is considered finished. some c compilers include : β€’ gcc, an open - source c compiler developed by the gnu project β€’ clang, an open - s...
openstax_introduction_to_computer_science_-_web
[ -0.03968844562768936, -0.013704271055758, -0.0008137639961205423, -0.015268798917531967, -0.01270618848502636, -0.009795027785003185, 0.013831653632223606, -0.006530701648443937, -0.01793234422802925, 0.024189531803131104, -0.00473321508616209, 0.006588582880795002, 0.009003624320030212, -...
4. 2 β€’ building c programs 163 originally created for java programming. eclipse is portable as it is built in java and can be installed on any operating system. compiling and running c programs the compilation process involves several steps : β€’ compiler : high - level language converts to assembly β€’ assembler : assembl...
openstax_introduction_to_computer_science_-_web
[ -0.009785584174096584, -0.012349193915724754, 0.01999122090637684, -0.04287416487932205, 0.04440228268504143, 0.009366333484649658, -0.024980442598462105, -0.014119534753262997, 0.004662493243813515, 0.011056797578930855, 0.019151009619235992, 0.00226065656170249, -0.004720530938357115, -0...
a time, namely the first one. this is because a syntax error can cause false - alarm errors later in the source code, so warnings / errors after the first one could be false alarms. we recommend that, when you get compile errors or warnings, you edit to fix just the first one, and recompile ; do not try to fix warnings...
openstax_introduction_to_computer_science_-_web
[ -0.008436756208539009, 0.016798002645373344, 0.009561684913933277, -0.012494496069848537, -0.013024399057030678, -0.027975233271718025, -0.003424642374739051, -0.010377548635005951, -0.01666739024221897, 0.03646678850054741, -0.006133361253887415, 0.0028346958570182323, 0.011241012252867222,...
object code into a single program file that can be loaded into memory and executed. a linker is a program that performs linking. understanding linkers will help you build large programs, avoid dangerous programming errors, understand how language scoping rules are implemented, understand other important systems concept...
openstax_introduction_to_computer_science_-_web
[ 0.0075570386834442616, 0.006611053366214037, 0.022776836529374123, 0.0033124107867479324, 0.0113520547747612, -0.009594891220331192, 0.0019495413871482015, -0.017059164121747017, -0.007441254798322916, 0.023942122235894203, -0.012800328433513641, 0.007349363062530756, 0.03756037354469299, ...
4. 2 β€’ building c programs 165 figure 4. 19 source files and separately compiled relocatable object files can be linked into an executable object file. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) linkers are used to ensure : β€’ modularity : program can be written as a collection of sm...
openstax_introduction_to_computer_science_-_web
[ -0.031504519283771515, 0.010738163255155087, 0.04123972728848457, -0.007068436127156019, 0.02539820224046707, 0.025052303448319435, -0.0019306406611576676, 0.0013476087478920817, -0.01573866419494152, 0.018427586182951927, 0.016993185505270958, -0.004231161437928677, -0.03141702339053154, ...
+ compilation process ” by β€œ prog ” / wikimedia commons, cc0 1. 0 ) symbol definitions are stored in an object file ( by the assembler ) called a symbol table. a symbol table is an array of structures in which each entry includes name, size, and location of symbol. the second linking step performs code relocation ( fig...
openstax_introduction_to_computer_science_-_web
[ -0.010716382414102554, -0.02530749700963497, 0.03266558796167374, -0.03238041326403618, -0.003331113141030073, -0.02187376655638218, 0.028327710926532745, 0.015191052109003067, -0.00980574544519186, 0.034428149461746216, 0.03602541983127594, 0.015933038666844368, -0.011179201304912567, -0....
4. 2 β€’ building c programs 167 executable and linkable module format there are three kinds of object files ( modules ) that relate to the linking process ( figure 4. 22 ) : β€’ relocatable object file (. o file ) : contains code and data in a form that can be combined with other relocatable object files to form executabl...
openstax_introduction_to_computer_science_-_web
[ -0.027595072984695435, 0.0022193482145667076, 0.03533199802041054, -0.030087336897850037, 0.014454877004027367, -0.0009086947538889945, 0.007498567923903465, -0.01572825014591217, 0.005224903114140034, 0.05234437435865402, 0.00712194200605154, 0.026937836781144142, 0.013326442800462246, -0...
symbols that are referenced by module m but defined by some other module. β€’ local symbols : symbols that are defined and referenced exclusively by module m ( e. g., c functions and global variables defined with the static attribute ) ; local linker symbols are not local program variables ( linker does not deal with the...
openstax_introduction_to_computer_science_-_web
[ 0.000099537217465695, 0.000924942025449127, 0.03815095126628876, -0.013258411549031734, 0.004511223174631596, -0.007592455018311739, 0.056684188544750214, -0.028794582933187485, -0.04403617978096008, 0.0516924113035202, 0.015121345408260822, 0.03536268696188927, -0.003990745637565851, -0.0...
be avoided ( i. e., use static whenever you can, initialize the global variable, or use extern if you reference an external global variable ). the linker applies the following rules : β€’ rule 1 : multiple strong symbols are not allowed. each item can be defined only once, otherwise the linker issues an error. β€’ rule 2 :...
openstax_introduction_to_computer_science_-_web
[ -0.02116028591990471, 0.01402174960821867, 0.03980090469121933, 0.00609423965215683, -0.008276390843093395, 0.0027847473975270987, 0.02345958910882473, -0.001104374649003148, 0.0076484535820782185, 0.06390447169542313, 0.03068617917597294, -0.014689004048705101, 0.011974153108894825, -0.04...
4. 2 β€’ building c programs 169 figure 4. 25 the diagram illustrates how the ar archiver utility is used to create a sample version of the libc. a static library that only includes the atoi. o, printf. o, and random. o object files. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) commonly...
openstax_introduction_to_computer_science_-_web
[ 0.011805037036538124, 0.01125506404787302, 0.046091996133327484, -0.0201650969684124, -0.009228168055415154, 0.015266748145222664, -0.006388565991073847, -0.015646401792764664, 0.013538198545575142, 0.05786943808197975, 0.03952781483530998, -0.023765256628394127, 0.022190265357494354, -0.0...
attribution : copyright rice university, openstax, under cc by 4. 0 license ) concepts in practice apis in c the c language makes it possible to create a modular api ( application programming interface ) as a library with publicly visible function prototypes but secret function definitions. this is accomplished by dist...
openstax_introduction_to_computer_science_-_web
[ 0.003648947924375534, 0.006271579302847385, 0.04620278999209404, -0.0033838246017694473, 0.007493990007787943, -0.01302987989038229, -0.014098010025918484, -0.01935751736164093, -0.009810137562453747, 0.0670502781867981, 0.00141813769005239, -0.003830389119684696, 0.019522493705153465, -0....
in the running executables, and minor bug fixes of system libraries require each application to explicitly relink. a modern solution to this problem is to use shared libraries ( also called dynamic link libraries, dlls, or. so files ). a shared library is a library file that can be shared by multiple programs at the sa...
openstax_introduction_to_computer_science_-_web
[ 0.009487622417509556, -0.0022066307719796896, -0.0010760077275335789, 0.03116302751004696, 0.0020174148958176374, 0.005111160688102245, -0.00799183826893568, -0.03013584204018116, 0.018786486238241196, 0.03624015673995018, -0.02614227868616581, 0.0001257155236089602, 0.02775990404188633, -...
4. 2 β€’ building c programs 171 figure 4. 28 a shared library can be used by multiple programs simultaneously. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) when using shared libraries, object files that contain code and data may be loaded and linked into an application dynamically at l...
openstax_introduction_to_computer_science_-_web
[ -0.0026477554347366095, 0.008165832608938217, 0.019691186025738716, 0.00521010672673583, 0.020460354164242744, 0.026202162727713585, -0.01981787011027336, -0.028821762651205063, 0.013264927081763744, 0.03458715230226517, -0.01353379711508751, 0.0111679807305336, 0.03181974217295647, -0.058...
occurs after a program has already started running. as illustrated in the sample code, the program source code needs to explicitly call functions to link additional libraries. in linux, this is done by calls to the dlopen ( ) interface and compiling the source with the - l flag ( e. g., gcc main. c - ldl ). this is a b...
openstax_introduction_to_computer_science_-_web
[ -0.02266903966665268, 0.020128026604652405, 0.03415882587432861, -0.00564932357519865, 0.02676721103489399, 0.010800146497786045, 0.009898936375975609, -0.005609907675534487, -0.0034451992250978947, 0.03691437095403671, 0.0012990651885047555, -0.021746071055531502, 0.03762197121977806, -0....
4. 2 β€’ building c programs 173... / * get a pointer to the addvec ( ) function we just loaded * / addvec = dlsym ( handle, " addvec " ) ; if ( ( error = dlerror ( ) )! = null ) { fprintf ( stderr, " % s \ n ", error ) ; exit ( 1 ) ; } / * now we can call addvec ( ) just like any other function * / addvec ( x, y, z, 2 )...
openstax_introduction_to_computer_science_-_web
[ 0.026118652895092964, 0.03205250948667526, 0.05406267195940018, -0.010553835891187191, -0.009381319396197796, 0.0030642475467175245, -0.010492522269487381, -0.025888988748192787, -0.013909142464399338, 0.060490500181913376, 0.020685963332653046, -0.01524022314697504, 0.010042008012533188, ...
β€’ ldd ( linux ) : lists the shared libraries that an executable needs at runtime. version control management the process and tools used to store and improve multiple versions of project files is called version control. version control also helps support team collaboration, and allows for the ability to revert to an ear...
openstax_introduction_to_computer_science_-_web
[ 0.009070812724530697, 0.01768902689218521, 0.027910614386200905, -0.00004003932190244086, -0.05594251677393913, -0.03070547990500927, 0.007963331416249275, -0.02782355062663555, 0.012767110951244831, 0.06896410882472992, -0.010622779838740826, 0.013973589055240154, 0.03329610079526901, -0....
org / r / 76githubtutor ) for more details on how to use git.
openstax_introduction_to_computer_science_-_web
[ 0.010347182862460613, -0.011123724281787872, -0.023681901395320892, 0.003512613708153367, -0.0339190699160099, -0.04405011236667633, 0.027386358007788658, 0.006074346601963043, 0.027081353589892387, 0.05360248684883118, -0.02307800203561783, 0.009363200515508652, 0.033306993544101715, -0.0...
4. 3 parallel programming models learning objectives by the end of this section, you will be able to : β€’ define parallel computing and related terminology β€’ discuss parallel programming approaches so far, our programs have run on a single at a time and the assumption is that the underlying machine only supported a sing...
openstax_introduction_to_computer_science_-_web
[ 0.021658940240740776, -0.015171377919614315, -0.031145630404353142, 0.012906603515148163, 0.011868181638419628, -0.0012440099380910397, -0.014781171455979347, -0.03509154170751572, 0.0001471792784286663, 0.05420608073472977, 0.032874200493097305, -0.017028050497174263, 0.007094412576407194, ...
full speed at the same time. that capability is occasionally useful, but more often a user wants a single high - demand program to make full use of their computer. this is the case with productivity software, games, embedded systems, and web server software. for this to work, the program needs to be coded in a way that...
openstax_introduction_to_computer_science_-_web
[ -0.009379141964018345, 0.004849996417760849, -0.020858239382505417, 0.01112440600991249, -0.004916726611554623, -0.02906056120991707, -0.012306229211390018, -0.040765102952718735, 0.006427195388823748, 0.07018440216779709, 0.009222778491675854, 0.02831663005053997, 0.026439247652888298, -0...
4. 3 β€’ parallel programming models 175 on multiple processors. figure 4. 30 this diagram illustrates how multiple computer programs can be executed as tasks on a multi - core machine either in parallel on separate individual cores using parallel computing or in sequence ( on a single or on multiple cores ) using serial...
openstax_introduction_to_computer_science_-_web
[ 0.035079799592494965, -0.010333869606256485, -0.042241040617227554, 0.0205749049782753, 0.0018690978176891804, -0.025490418076515198, -0.02994702197611332, -0.02633131481707096, 0.01111497264355421, 0.06481634825468063, 0.012324616312980652, 0.008325868286192417, 0.0040976605378091335, -0....
caused a severe shortage. customers encountered long waiting lists for gpus, or found that they were unavailable entirely. scalpers sold gpus at a substantial upcharge. some people were unable to buy video games, or computers they needed to complete work. the shortages affected heavy industry ; automobile manufacturers...
openstax_introduction_to_computer_science_-_web
[ -0.012171161361038685, -0.014516831375658512, -0.009639517404139042, 0.028940286487340927, -0.019657135009765625, -0.0035089056473225355, -0.02080429345369339, -0.03614748269319534, -0.02523070201277733, 0.09110209345817566, 0.008666368201375008, 0.013037899509072304, 0.009952588938176632, ...
, video, or audio in an application like microsoft teams. examples include pthreads, openmp, microsoft threads, java and python threads, and cuda threads for gpus. β€’ message passing : a parallel programming approach where separate processes communicate only by sending messages, not sharing memory. each set of tasks use...
openstax_introduction_to_computer_science_-_web
[ -0.006494900211691856, -0.020769808441400528, -0.003966951742768288, 0.006302282214164734, 0.0021197081077843904, -0.019289983436465263, -0.011156408116221428, -0.046688102185726166, 0.009256922639906406, 0.06576284766197205, 0.026457488536834717, 0.014891281723976135, 0.020364606752991676, ...
4. 3 β€’ parallel programming models 177 programming paradigm and new emerging computing technologies for their application needs? designing parallel programs designing and developing parallel programs has historically been a very manual process. the programmer is typically responsible for both identifying and actually i...
openstax_introduction_to_computer_science_-_web
[ -0.0072273132391273975, -0.020113099366426468, -0.023067349568009377, 0.0002704051439650357, 0.022579964250326157, -0.003762028645724058, -0.014907297678291798, -0.02262389287352562, 0.0006962616462260485, 0.07428020983934402, -0.015641050413250923, -0.01247247401624918, 0.002162081422284245...
the problem into discrete " chunks " of work ; ( 3 ) identifying the need for communications between tasks ; ( 4 ) synchronizing the sequence of work and the tasks being performed ; ( 5 ) identifying data dependencies between program statements ; ( 6 ) performing load balancing to distributing approximately equal amoun...
openstax_introduction_to_computer_science_-_web
[ -0.013545574620366096, -0.001445186324417591, -0.016617195680737495, -0.0064390371553599834, 0.022479284554719925, -0.01867912895977497, -0.00960997212678194, -0.020558364689350128, 0.008278544060885906, 0.06253553181886673, -0.0050034248270094395, 0.01113837119191885, 0.033876389265060425, ...
4. 0 license ) link to learning parallel programming is a deep subject with many avenues for further study, from the low - level details of hardware and programming to high - level parallel algorithm design. learn more about the introduction to parallel computing tutorial ( https : / / openstax. org / r / 76parallelcom...
openstax_introduction_to_computer_science_-_web
[ 0.02471286430954933, 0.004983306862413883, -0.009772184304893017, 0.005955960135906935, 0.016861092299222946, 0.0264713354408741, -0.02807651087641716, -0.0452413409948349, -0.0009240559302270412, 0.0645938590168953, -0.017494024708867073, 0.01696515455842018, 0.014837789349257946, -0.0611...
4. 3 β€’ parallel programming models 179 sequential section in which it sets up the environment, initializes the variables, and so on. when run, an openmp program will use one thread in the sequential sections, and several threads in the parallel sections. the parent thread is the thread that runs from the program beginn...
openstax_introduction_to_computer_science_-_web
[ 0.007156350649893284, -0.0017226249910891056, -0.03214937821030617, -0.017059188336133957, 0.0587395615875721, -0.0290432870388031, -0.018846683204174042, -0.050346020609140396, 0.027025818824768066, 0.044193632900714874, 0.03583679348230362, 0.03077785298228264, -0.0043630413711071014, -0...
: copyright rice university, openstax, under cc by 4. 0 license ) 180 4 β€’ linguistic realization of algorithms : low - level programming languages access for free at openstax. org
openstax_introduction_to_computer_science_-_web
[ 0.00803416222333908, -0.0004630973853636533, -0.002251613885164261, -0.03698942810297012, -0.013857412151992321, -0.06198616698384285, -0.018641255795955658, -0.00794150959700346, -0.028059663251042366, 0.046262476593256, 0.030355243012309074, 0.011449080891907215, 0.0027383279521018267, -...
4. 4 applications of programming models learning objectives by the end of this section, you will be able to : β€’ discuss the future of low - level programming β€’ understand how the c language is used to develop firmware for embedded systems β€’ develop kernel code using the c programming language high - level languages are...
openstax_introduction_to_computer_science_-_web
[ 0.033969298005104065, -0.002750964369624853, -0.00738363666459918, -0.02984592691063881, -0.026900479570031166, 0.011214037425816059, -0.0162291768938303, -0.04145471006631851, -0.008334466256201267, 0.06767015904188156, 0.019479211419820786, 0.01183092687278986, 0.024006498977541924, -0.0...
positive features are also found in rust : efficient execution, portability, modularity, procedural and structured programming, and recursion. rust has the capability to manipulate pointers but adds native safety features so that the compiler can help the programmer prevent bugs related to pointers. the language also i...
openstax_introduction_to_computer_science_-_web
[ 0.015121448785066605, -0.0040357778780162334, -0.008055945858359337, -0.03376505523920059, 0.01069569494575262, 0.018190136179327965, -0.0076673198491334915, -0.010715554468333721, -0.0289057195186615, 0.05374201759696007, 0.0021822750568389893, 0.0017133927904069424, 0.00839797779917717, ...
4. 4 β€’ applications of programming models 181 global issues in technology naming of c procedures it is a best practice to give procedures descriptive names that help a reader understand what the procedure does. english has been globally accepted as the language of programming, but this can cause some problems in non – ...
openstax_introduction_to_computer_science_-_web
[ 0.0031036909203976393, -0.021246008574962616, 0.010409465990960598, -0.02723253332078457, -0.031199607998132706, 0.00038871762808412313, 0.01547227893024683, -0.02952759340405464, -0.04153582453727722, 0.0703798159956932, 0.05096108093857765, 0.011158612556755543, 0.020458821207284927, -0....
and figure out how to send data to the target device. technology in everyday life you and the internet of things as iot technology advances and computer parts get less expensive, more and more categories of iot device are coming to market. fitness monitors have helped people stay in shape. smart thermostats have conser...
openstax_introduction_to_computer_science_-_web
[ -0.006494299508631229, 0.023000819608569145, -0.010754149407148361, -0.009568662382662296, 0.0000873462631716393, -0.00014826013648416847, 0.019484279677271843, -0.0004407122323755175, 0.033624015748500824, 0.031121712177991867, 0.0301249697804451, 0.004833095706999302, 0.03367273882031441, ...
you already have a powerful processor and modern hardware devices on your laptop or desktop. this may be all you need to get started. the qemu emulator ( https : / / www. qemu. org / ) can emulate the latest arm processors and intel processors, so everything you need is already on hand. there are many toy kernels and d...
openstax_introduction_to_computer_science_-_web
[ -0.010856167413294315, 0.022349130362272263, -0.010144609026610851, -0.016702812165021896, 0.02410450391471386, -0.018933800980448723, 0.0013071252033114433, -0.017750674858689308, 0.024935128167271614, 0.03177199140191078, 0.0009702403913252056, -0.007418832741677761, 0.042086560279130936, ...
4. 4 β€’ applications of programming models 183 chapter review key terms abstract model technique that derives simpler high - level conceptual models for a computer while exploring the science of what new algorithms can or cannot do allocated memory memory region set aside to hold a value archive file. a file that contai...
openstax_introduction_to_computer_science_-_web
[ 0.0026645625475794077, 0.010791782289743423, 0.010426517575979233, 0.007464730646461248, 0.005284258630126715, 0.0020402390509843826, 0.009522201493382454, -0.04547588899731636, -0.020991642028093338, 0.07443571090698242, 0.02123292163014412, -0.006303370930254459, -0.007109384983778, -0.0...
, but the processors are in multiple connected computers, not a single computer executable and linkable format ( elf ) standard binary format for object code external reference symbol that is used in a module, but not defined in that module, so is expected to be defined in some other module firmware very low - level co...
openstax_introduction_to_computer_science_-_web
[ -0.011869617737829685, -0.008060719817876816, -0.0028352236840873957, 0.0348048135638237, 0.004974988754838705, -0.01162207406014204, 0.012401287443935871, -0.04483022540807724, -0.025203388184309006, 0.04767916351556778, 0.005907732527703047, 0.0007643810822628438, -0.02093336544930935, -...
programming paradigm level of abstraction degree to which a computational model, programming language, or piece of software relates to computer hardware library file that contains object code for functions and global variables that are intended to be reused linker program that performs linking linking process of collec...
openstax_introduction_to_computer_science_-_web
[ -0.026237426325678825, -0.03279130160808563, -0.008809897117316723, 0.010234719142317772, 0.01926211453974247, -0.007389988284558058, 0.00009337926167063415, -0.03887246549129486, -0.02147834002971649, 0.062339868396520615, 0.0028936220332980156, 0.013217007741332054, -0.0091322660446167, ...
pointer variable that holds the memory address of another variable and points to that variable 4 β€’ chapter review 185 procedural programming paradigm in which code is organized into procedures procedure function in the context of programming programming language paradigm philosophy and approach for organizing code prog...
openstax_introduction_to_computer_science_-_web
[ -0.007768450304865837, -0.009796781465411186, 0.028213640674948692, 0.010192112997174263, 0.0036443958524614573, 0.0032826538663357496, 0.026275014504790306, -0.019082384184002876, -0.03556450083851814, 0.04552070051431656, 0.0008916312945075333, 0.0038389433175325394, 0.006567150820046663, ...
to revert to an earlier versions visual c + + proprietary - license c and c + + compiler developed by microsoft summary
openstax_introduction_to_computer_science_-_web
[ -0.039753980934619904, -0.025687070563435555, 0.044192783534526825, -0.004954620264470577, 0.023520560935139656, -0.027402492240071297, -0.054267026484012604, -0.04107668623328209, -0.02877694182097912, 0.023233797401189804, -0.027367061004042625, -0.0019748008344322443, 0.014148794114589691...
4. 1 models of computation β€’ a computational model defines what an algorithm or program does. there are hardware models, programming language models, and abstract models. β€’ low - level programming means writing machine code that can be understood by a cpu directly, or something very near to that. it is laborious but yi...
openstax_introduction_to_computer_science_-_web
[ 0.006190710235387087, -0.04029983654618263, -0.022020848467946053, -0.027315478771924973, 0.013999568298459053, -0.0009655715548433363, -0.008181271143257618, -0.03971946984529495, -0.020119428634643555, 0.06329794228076935, 0.02811155840754509, 0.04131384938955307, -0.038035839796066284, ...
4. 2 building c programs β€’ the c programming language is the most prominent example of a low - level language. programs written in c typically execute as fast as assembly language and allow programmers to directly manipulate machine features such as memory via the use of pointers. β€’ the c programming language is used b...
openstax_introduction_to_computer_science_-_web
[ 0.013014095835387707, -0.019778579473495483, 0.02461707405745983, -0.03251870349049568, 0.005161177832633257, 0.017343591898679733, -0.006860509514808655, -0.016312040388584137, -0.02866765297949314, 0.06936287879943848, 0.02220533788204193, -0.0021175588481128216, -0.015175643377006054, -...
and linking. β€’ linking is the process of combining the. o files that result from separate c modules into one deliverable library or executable program. β€’ a library is a file that contains the object code of compiled functions. there are several variations of libraries ( static, dynamic, shared ) and ways of linking the...
openstax_introduction_to_computer_science_-_web
[ -0.010046734474599361, -0.003030769992619753, -0.0044677285477519035, 0.009967729449272156, 0.048100970685482025, 0.002105460502207279, -0.012248015031218529, -0.04717984423041344, 0.015345059335231781, 0.06679749488830566, -0.007582413032650948, 0.014139733277261257, 0.00014183066377881914,...
4. 4 applications of programming models β€’ low - level and middle - level programming will continue to be important as society increasingly relies on low - powered computing devices and iot. β€’ middle - level languages including c are ideal for developing firmware and kernels. 4 β€’ chapter review 187 β€’ rust is a relativel...
openstax_introduction_to_computer_science_-_web
[ 0.020806849002838135, -0.00685768760740757, -0.015561317093670368, -0.02263658680021763, -0.02258368395268917, 0.0004098228528164327, -0.0026411358267068863, -0.04827849566936493, -0.03233017772436142, 0.06995837390422821, 0.004848639480769634, 0.02464824542403221, -0.019670864567160606, -...
. an ide is a single tool for coding, while a non - ide environment requires no tools. b. an ide bundles all of the tools into one app with a graphical interface, while a non - ide environment is a collection of several tools. c. an ide uses only command - line programs, while a non - ide environment uses graphical too...
openstax_introduction_to_computer_science_-_web
[ -0.010534643195569515, 0.0016933456063270569, -0.016989106312394142, -0.03227643296122551, 0.014352425932884216, -0.031704261898994446, -0.0016830501845106483, -0.02634161338210106, -0.04156021028757095, 0.05335184559226036, -0.01595110446214676, 0.04525686055421829, -0.0025858322624117136, ...
performs tasks assigned by the child thread. c. the parent thread starts child threads, monitors them, and cleans the program. d. both parent and child threads perform the same tasks simultaneously. 12. what are examples of parallel programming models? a. single - threaded and multi - threaded b. interpreter and compil...
openstax_introduction_to_computer_science_-_web
[ -0.010047322139143944, -0.0012376439990475774, -0.01613721065223217, -0.01794855296611786, -0.006195418536663055, 0.0019835520070046186, -0.038979560136795044, -0.0512826070189476, -0.015955442562699318, 0.0792875736951828, 0.004979751538485289, 0.02156035043299198, 0.011371220462024212, -...
best way to use goto in the structured paradigm? 7. for each of the following programming languages : investigate the language. is the language low - level, middle - level, or high - level? which of the paradigms covered in this section apply to the language ( imperative, declarative, functional, structured, procedural...
openstax_introduction_to_computer_science_-_web
[ 0.005181760527193546, -0.013874487020075321, 0.00008095944940578192, 0.00964111927896738, -0.007191103883087635, -0.005498765967786312, -0.022646578028798103, -0.008657181635499, -0.02565084770321846, 0.05375398322939873, -0.00024730194127187133, 0.028853334486484528, -0.019748078659176826, ...
##x. org 12. non - parallel programs work, and parallel programming can be difficult. why is it important for programmers to make the effort to make their programs parallel? why not stick with non - parallel programming? 13. why is it difficult for developers to use the multi - threaded programming paradigm in order to...
openstax_introduction_to_computer_science_-_web
[ 0.01374267227947712, 0.034231435507535934, -0.010453839786350727, -0.019697532057762146, -0.005851583555340767, -0.032547250390052795, -0.008862422779202461, -0.031408049166202545, 0.004245191812515259, 0.07830093055963516, 0.005463374312967062, 0.016177475452423096, 0.009293443523347378, ...
write a gcc command to compile a c file titled main. c that includes a static library titled mystaticlib. 10. trace the following c code and list the contents of the array after the iteration. int main ( ) { int list [ 5 ] ; int a = 10 ; for ( int i = 0 ; i < 5 ; i + + ) { list [ i ] = a + i ; } return 0 ; } 11. the fo...
openstax_introduction_to_computer_science_-_web
[ 0.01779334247112274, 0.006877200677990913, 0.01757352240383625, -0.005760103464126587, 0.025667984038591385, -0.007034917827695608, 0.004872003570199013, -0.004147895611822605, 0.00962403416633606, 0.06310952454805374, 0.037130679935216904, -0.0027594021521508694, -0.007551279850304127, -0...
##p _ get _ thread _ num ( ) function in the header file omp. h. to get the number of total running threads in the parallel block, you can use function omp _ get _ num _ threads. how can you modify this program to ensure that only one thread executes the β€œ greetings from process ” printf statement? # include < stdio. h...
openstax_introduction_to_computer_science_-_web
[ 0.016338670626282692, -0.00018771158647723496, 0.0025663496926426888, 0.032477326691150665, -0.004325733054429293, -0.022006822749972343, 0.005237011704593897, -0.024731919169425964, 0.026657048612833023, 0.035305511206388474, 0.01461082324385643, 0.02111855521798134, -0.036914676427841187, ...
##pc architectures β€” specifically, how each of them has different assembly language features and syntax. then research and explain how high - level languages can be compiled on different computer architectures. 3. provide a real - life example of abstraction and explain how it is similar to abstraction in computing. 4....
openstax_introduction_to_computer_science_-_web
[ 0.03225407004356384, 0.008714373223483562, -0.00017640506848692894, -0.022187108173966408, 0.022611523047089577, 0.0012523597106337547, -0.010032512247562408, -0.027695119380950928, 0.008294138126075268, 0.06429125368595123, 0.0034387886989861727, 0.012532450258731842, 0.03826112300157547, ...
that will collect and report the temperature of a room over the course of a week on a single battery charge. your team is well versed in javascript and c. what language would you select to write the web application gui and the code to operate the sensor? explain the choice of language while connecting the level of each...
openstax_introduction_to_computer_science_-_web
[ 0.020961884409189224, 0.021130649372935295, -0.03378920257091522, 0.0028756463434547186, -0.02240915223956108, 0.0047764163464307785, -0.013386469334363937, -0.038521990180015564, -0.02317785657942295, 0.024593394249677658, -0.009084456600248814, 0.008527465164661407, 0.031879547983407974, ...
are the advantages and disadvantages of this approach? 6. when the mozilla foundation created rust, c was already an established middle - level language. why was it worth the effort for them to create an entirely new language? you may wish to consult online sources ; if you do, cite them. labs 1. work with a partner to...
openstax_introduction_to_computer_science_-_web
[ 0.034440621733665466, 0.02846580371260643, 0.0004361642349977046, -0.03159583732485771, -0.022583095356822014, -0.018395638093352318, -0.023168696090579033, -0.021302545443177223, -0.02381858229637146, 0.07087098807096481, -0.010789715684950352, -0.0015195052837952971, 0.04271465167403221, ...
##x. org figure 5. 1 what does the word computer really mean? for example, supercomputers ( left ) and data centers ( right ) are types of computers. " ( credit left : modification of β€œ columbia supercomputer β€” nasa advanced supercomputing facility ” by trower, nasa / goddard space flight center, public domain ; credit...
openstax_introduction_to_computer_science_-_web
[ 0.04643630236387253, -0.036348093301057816, 0.005102402530610561, 0.030108552426099777, 0.019969450309872627, -0.03511307016015053, 0.02094843238592148, 0.01810065656900406, -0.013668042607605457, 0.037837546318769455, 0.018119780346751213, 0.010112662799656391, 0.012443517334759235, -0.01...
5. 6 processor architectures introduction we use the word computer a lot, but we may not know a precise definition of it. more often than not, we use it to mean our desktops and laptops. but computers exist in many different forms, like your laptop, smartphone, or tablet. embedded processors are used to power smart hom...
openstax_introduction_to_computer_science_-_web
[ 0.012858126312494278, -0.0009440003195777535, 0.007432123646140099, 0.018777480348944664, 0.033803001046180725, 0.0036897272802889347, -0.02265852689743042, -0.013193920254707336, 0.004099727142602205, 0.02745048701763153, -0.007996590808033943, 0.022213371470570564, 0.00415588216856122, -...
nanotechnology, processor models known as neuromorphic processors, to enable the creation of the next generation of super society intelligent autonomous solutions ( e. g., advanced robotics, autonomous cars and drones, or other autonomous systems ). the use of intel ’ s kapoho point 8 - chip loihi 2 board technology al...
openstax_introduction_to_computer_science_-_web
[ 0.014333607628941536, 0.026796940714120865, -0.03234286606311798, 0.019062435254454613, 0.024333249777555466, -0.006418629549443722, 0.007098026107996702, -0.037774812430143356, 0.03568798676133156, -0.004745324142277241, 0.0047256662510335445, 0.027853624895215034, -0.01337806973606348, -...
5. 1 computer systems organization learning objectives by the end of this section, you will be able to : β€’ define a computer system β€’ explain how information is stored and transferred in a computer system β€’ differentiate between high - level and machine - level programs β€’ identify the elements of a typical computer sys...
openstax_introduction_to_computer_science_-_web
[ -0.030764378607273102, -0.015082883648574352, -0.0253044031560421, -0.011589075438678265, 0.02752816677093506, 0.002631715266034007, -0.013850473798811436, -0.02553267404437065, -0.004794970620423555, 0.06231922656297684, 0.010143198072910309, 0.03736244514584541, -0.006212226115167141, -0...
computer system. figure 5. 2 ip addresses use a standardized dotted - decimal notation that corresponds to a string of bits. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) computer systems a computer system consists of two major parts : hardware and software. the hardware includes the p...
openstax_introduction_to_computer_science_-_web
[ -0.01071957964450121, -0.02955840714275837, -0.006280566565692425, -0.018797794356942177, 0.005325240548700094, 0.0015350555768236518, 0.014412151649594307, -0.020757319405674934, -0.0022843186743557453, 0.05464853718876839, 0.007294356822967529, 0.012781389988958836, -0.00724994670599699, ...
on electricity work. other types, still not in the mainstream market but in design and testing stages, such as quantum computers, do not use bits but use something else called quantum bits or qubits. if we say that a text editor program takes 1 megabyte of storage, it means that the editor is stored inside the computer...
openstax_introduction_to_computer_science_-_web
[ 0.008064251393079758, -0.03658052161335945, 0.007878872565925121, -0.007722041103988886, -0.009062476456165314, -0.018396617844700813, 0.011510823853313923, -0.012589548714458942, -0.04704923927783966, 0.051081348210573196, 0.02107173390686512, 0.01096880529075861, 0.017861848697066307, -0...
number 1 to number 2 and save the result as number 3. ” these instructions are stored as a series of 1s and 0s. each group of those 1s and 0s represents a single instruction. all the instructions, in their representation as 1s and 0s, are stored in a file called an executable file on the disk. when you click an icon or...
openstax_introduction_to_computer_science_-_web
[ -0.010630900971591473, -0.017994070425629616, 0.019193995743989944, -0.02836287021636963, 0.018594997003674507, -0.03265167400240898, -0.011808130890130997, 0.014641744084656239, 0.0037492357660084963, 0.05728147178888321, 0.018536504358053207, 0.021524488925933838, 0.018245460465550423, -...
5. 4 machine - level program representation ), but we now know what they do. here, we will look at how the hardware executes instructions. figure 5. 3 programs developed in high - level languages ( hlls ) such as c + +, java, or python are then translated into executables that a computer can run. ( attribution : copyri...
openstax_introduction_to_computer_science_-_web
[ -0.006602857727557421, -0.03029365837574005, -0.023291090503335, -0.03367052599787712, 0.017879651859402657, -0.013261890038847923, 0.00718204490840435, -0.012392558157444, -0.015836695209145546, 0.05416937917470932, 0.02237805537879467, 0.031673796474933624, 0.005190601106733084, -0.02856...
next instruction. figure 5. 4 shows a computer system ’ s hardware. inside the cpu we can see the alu, a group of registers ( called a register file ), and a piece of hardware, called the memory controller, that helps the cpu talk to the memory. inside the cpu we also find fast storage, which is faster than the memory ...
openstax_introduction_to_computer_science_-_web
[ 0.027811652049422264, 0.002051117829978466, 0.0016498325858265162, 0.006216153036803007, -0.00743490643799305, -0.01214433554559946, 0.013286220841109753, -0.025152795016765594, 0.025732053443789482, 0.04623173549771309, 0.03294490650296211, 0.022620245814323425, 0.015694277361035347, -0.0...
5. 5 memory hierarchy. 198 5 β€’ hardware realizations of algorithms : computer systems design access for free at openstax. org figure 5. 4 any computer system consists of several components that, together, help the computer do its job of executing programs. ( attribution : copyright rice university, openstax, under cc b...
openstax_introduction_to_computer_science_-_web
[ -0.01295917946845293, -0.00703064352273941, 0.031158726662397385, 0.009120057336986065, 0.03562967851758003, -0.03518185019493103, -0.006813914515078068, -0.02252376265823841, 0.00645064190030098, 0.03249617666006088, -0.00011030246241716668, 0.007355497218668461, -0.018385805189609528, -0...
5. 1 β€’ computer systems organization 199 a picture on the screen or a sound from a speaker. distinct devices have different speeds and varying ways of transforming the input and output to / from 1s and 0s. any i / o device, your keyboard for example, connects to the computer system using an interface such as a usb port...
openstax_introduction_to_computer_science_-_web
[ -0.005405707750469446, -0.01994979754090309, -0.009121357463300228, 0.017809303477406502, 0.021005993708968163, 0.0002135015674866736, 0.0346645750105381, -0.011562604457139969, 0.025989655405282974, 0.04482467845082283, 0.0007671237690374255, 0.01867998018860817, -0.0014139804989099503, -...
doing so until the program ends. there have been huge advances in processor design leading to faster and more powerful computers. the processor in your smartphone today is more powerful than a big supercomputer was a few decades ago.
openstax_introduction_to_computer_science_-_web
[ 0.009821679443120956, -0.022030171006917953, -0.017864326015114784, 0.04580894485116005, 0.03719022125005722, 0.005764410365372896, 0.016040490940213203, -0.01313690934330225, 0.03268776088953018, 0.022783849388360977, 0.03746473044157028, 0.021514201536774635, 0.020764611661434174, -0.045...
5. 2 computer levels of abstraction learning objectives by the end of this section, you will be able to : β€’ describe abstraction levels from the highest to the lowest β€’ explain application programs abstractions in relation to hlls and instruction set architectures β€’ discuss processor abstractions and how microarchitect...
openstax_introduction_to_computer_science_-_web
[ 0.011721762828528881, -0.0001452286378480494, 0.03869665414094925, 0.011080367490649223, 0.02587735466659069, -0.01618489995598793, -0.004777461756020784, -0.04310917109251022, -0.03833566978573799, 0.08048198372125626, 0.006503179669380188, 0.03590868040919304, 0.01924929767847061, -0.057...
you may use computers to play games or listen to music, and in these cases, the problems that the computer is trying to solve are associated with programs that you use for entertainment purposes. the top line in figure 5. 5 starts with the problem ; we must have a very precise definition of the problem we are trying to...
openstax_introduction_to_computer_science_-_web
[ 0.021596448495984077, 0.018835291266441345, 0.029162241145968437, -0.002221266506239772, 0.0039581963792443275, -0.025253381580114365, -0.024709545075893402, 0.012766069732606411, -0.005904409568756819, 0.07471182942390442, 0.043157026171684265, -0.030934389680624008, 0.005723545327782631, ...
an infinite number of even numbers. assuming we have an algorithm, we then need to prepare it for execution on the computer. first, we must prepare the input before it is ready to be consumed by the computer, so we give the algorithm to a programmer whose job it is to read the algorithm, understand it, and then write a...
openstax_introduction_to_computer_science_-_web
[ 0.016516461968421936, 0.006679703015834093, -0.02221105806529522, -0.036354221403598785, 0.017011862248182297, -0.01727638766169548, -0.00003958242814405821, 0.01317164208739996, -0.009326732717454433, 0.059221379458904266, 0.042783595621585846, -0.004532388411462307, -0.006164092104882002, ...
5. 2 β€’ computer levels of abstraction 201 figure 5. 6 the resulting program is consumable by a computer during and after testing. ( credit : β€œ programmer flat set ” by macrovector _ official / freepik, cc by 2. 0 ) application programs abstractions next, the programmer writes a program. the main difference between an a...
openstax_introduction_to_computer_science_-_web
[ 0.002250689547508955, -0.00936839822679758, 0.011383574455976486, -0.02102227881550789, 0.01799108274281025, -0.0427556037902832, -0.0004560697707347572, -0.021145949140191078, -0.049906302243471146, 0.0451761819422245, -0.001596424262970686, 0.02828901819884777, 0.024737725034356117, -0.0...
that all programmers use? programming languages are typically designed to help create readable programs. however, some languages are designed with specific applications in mind. that is, some programming languages are easier to use for designing games, while other languages are meant to address mathematical problems or...
openstax_introduction_to_computer_science_-_web
[ 0.012082469649612904, 0.0005117941182106733, -0.010763656347990036, -0.01867281086742878, 0.011571720242500305, -0.035027120262384415, 0.02460348792374134, -0.0034574742894619703, -0.01607052981853485, 0.0572238564491272, 0.005186946131289005, 0.014454801566898823, -0.010199970565736294, -...
copyright rice university, openstax, under cc by 4. 0 license ) one low - level language designed to be computer friendly rather than human friendly is called assembly language. it does not use all the constructs found in hlls such as objects or sophisticated data structure, which leads to two challenges. the first cha...
openstax_introduction_to_computer_science_-_web
[ 0.024335293099284172, -0.01127899531275034, 0.009029875509440899, -0.014533941633999348, 0.013571190647780895, -0.023465806618332863, 0.005155519116669893, -0.005970110651105642, -0.044024042785167694, 0.035579632967710495, -0.005909696687012911, 0.012735757976770401, -0.033860594034194946, ...
5. 2 β€’ computer levels of abstraction 203 figure 5. 8 programmers write in programs using hlls but computers execute binary code, so we need to perform a translation. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) the second challenge relates to managing the assembly language itself. if...
openstax_introduction_to_computer_science_-_web
[ -0.008700555190443993, 0.0048630814999341965, -0.01775812730193138, -0.0034035330172628164, 0.02753402851521969, -0.0038951535243541002, 0.0018917970592156053, -0.013696076348423958, -0.02675211988389492, 0.05230379477143288, -0.017377564683556557, 0.02592807076871395, -0.014944227412343025,...
5 β€’ hardware realizations of algorithms : computer systems design access for free at openstax. org as we saw earlier, the output of the compiler is the input to the assembler so we need assemblers for each isa in existence to generate a machine language file ( e. g.,. exe file ) that the processor can execute. processo...
openstax_introduction_to_computer_science_-_web
[ -0.021664688363671303, -0.01782064512372017, -0.02333778887987137, -0.02047467604279518, 0.017850728705525398, -0.046114761382341385, -0.01049173716455698, -0.016673671081662178, -0.040771644562482834, 0.049227386713027954, -0.007423467934131622, 0.030395857989788055, -0.022986983880400658, ...
to learning the transistor is the building block of the hardware of any computer. a transistor is merely an on / off switch ; when it is on, it lets the electrical current pass. when it is off, it blocks the electrical current. this is very similar to the light switch you find in your room. but with these transistors, ...
openstax_introduction_to_computer_science_-_web
[ 0.011145513504743576, -0.012889932841062546, -0.03351933881640434, -0.03149143233895302, 0.014164527878165245, -0.047325681895017624, 0.023646967485547066, -0.03263245150446892, 0.0044590928591787815, 0.038958095014095306, 0.009483180940151215, -0.0004576953360810876, 0.003866441547870636, ...
5. 2 β€’ computer levels of abstraction 205 figure 5. 9 although it may just take seconds to execute, there are several steps included in a microarchitecture process to deliver results for the user. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) to summarize, inside the processor you find...
openstax_introduction_to_computer_science_-_web
[ 0.007266147993505001, -0.004652016330510378, -0.0003106046933680773, -0.028388556092977524, 0.0188275333493948, -0.04794037714600563, 0.00617646612226963, -0.01492234505712986, -0.027441449463367462, 0.0699753537774086, 0.005868344102054834, 0.03526443988084793, 0.011047438718378544, -0.06...
way, we build an and gate. if we connect them in a different way, we build an or gate, and so on. if we try to see how transistors are built and work, then we move to the semiconductor level. at this level we use a special material such as silicon and a special, and very expensive, process to turn it into a working tra...
openstax_introduction_to_computer_science_-_web
[ 0.012737940065562725, 0.002602651249617338, -0.009699617512524128, -0.023634374141693115, 0.004536873195320368, -0.024237481877207756, -0.026206525042653084, -0.003247688990086317, -0.035547781735658646, 0.0623340904712677, 0.008451297879219055, -0.00020498945377767086, 0.04530423507094383, ...
is easier to find them when needed. figure 5. 10 the operating system functions as a manager that connects the hardware in the computer to the software. ( attribution : copyright rice university, openstax, under cc by 4. 0 license ) a file is a generic name for any entity we want to store in the computer. for example, ...
openstax_introduction_to_computer_science_-_web
[ 0.010626215487718582, 0.01689181849360466, 0.025209950283169746, 0.017213352024555206, 0.004954561125487089, -0.013905072584748268, -0.01726134866476059, -0.0036618662998080254, 0.013735737651586533, 0.07542655616998672, 0.03177371621131897, -0.01935018226504326, 0.033790893852710724, -0.0...
. scientists are trying, for example, to build computers using dna. we have dna computing, and we have a prototype for dna storage, too. we have several prototypes from various companies of quantum computing where instead of using bits, 1 and 0, the machines use quantum bits ( qubits ) that take a value between 1 and 0...
openstax_introduction_to_computer_science_-_web
[ 0.010260751470923424, -0.026452137157320976, -0.0028261265251785517, -0.03306341916322708, 0.01092035323381424, -0.003986030351370573, -0.004113015253096819, -0.014217249117791653, -0.038433171808719635, 0.057605184614658356, 0.04406891390681267, -0.013010076247155666, -0.000218355271499604,...
5. 3 machine - level information representation learning objectives by the end of this section, you will be able to : β€’ interpret binary numbers β€’ explain the use of standard character codes to represent letters and symbols β€’ define fractional binary numbers and explain how they are used in this section we look at two ...
openstax_introduction_to_computer_science_-_web
[ 0.020661884918808937, -0.00910928938537836, 0.033156268298625946, -0.022277940064668655, 0.011486703529953957, -0.022180575877428055, 0.043989211320877075, -0.03139903023838997, -0.04980973154306412, 0.07949487864971161, 0.02790702134370804, -0.02434019185602665, -0.011116628535091877, -0....
the ways unsigned integers and signed integers are represented in binary. link to learning the best way to get a clear view of how numbers are translated to binary so that computers can deal with them is to see the process in action. visit this site to convert any number from decimal to binary and vice versa ( https : ...
openstax_introduction_to_computer_science_-_web
[ 0.009849690832197666, -0.03285513073205948, 0.010555528104305267, -0.05212220922112465, 0.028048072010278702, -0.045883819460868835, 0.08399038761854172, 0.0046014017425477505, -0.042939137667417526, 0.10748091340065002, 0.019914699718356133, -0.01565382443368435, 0.006319540552794933, 0.0...
word signed means that they have a sign of + or –. to present negative numbers, designers experimented with several options before picking the de facto choice. the obvious option is to use the most significant bit ( i. e., the leftmost bit ) as a sign bit where 0 means positive and 1 means negative. the rest of the num...
openstax_introduction_to_computer_science_-_web
[ 0.007680739741772413, -0.028013644739985466, -0.004141674377024174, -0.02110966667532921, -0.0025522292125970125, -0.05374441668391228, 0.07667727023363113, -0.003788338042795658, -0.050690799951553345, 0.06942906230688095, 0.010082079097628593, -0.0019938007462769747, 0.0018763542175292969,...
figure 5. 12, let us take a number such as 110. its most significant bit is 1 so the number is negative and in its one ’ s complement form. to know its original value, we need to get its one ’ s complement again. the one ’ s complement of 110 is 001 which corresponds to decimal number 1, so the result is – 1. β€’ if the ...
openstax_introduction_to_computer_science_-_web
[ 0.0014374230522662401, 0.002014678670093417, 0.018340973183512688, -0.030756140127778053, -0.03828340023756027, -0.05405207350850105, 0.046542149037122726, -0.015938514843583107, -0.05065714567899704, 0.07908910512924194, 0.022405778989195824, -0.014059501700103283, -0.00896483100950718, -...
5. 3 β€’ machine - level information representation 209 example, to get the one ’ s complement of 011, we do it in two steps. first, we get the one ’ s complement : 011 is 100. second, we add 1 to the result : 100 + 1 = 101, and 101 is the two ’ s complement of 011. now that we know the definition of two ’ s complement, ...
openstax_introduction_to_computer_science_-_web
[ -0.001229282352142036, -0.011762414127588272, 0.01834338717162609, -0.01525941677391529, -0.028709067031741142, -0.03710367903113365, 0.049709778279066086, -0.022568944841623306, -0.038434796035289764, 0.10460177063941956, 0.028633631765842438, -0.0179233867675066, -0.00966265331953764, -0...