Saltar al contenido principal
LibreTexts Español

4.8: Ejercicios

  • Page ID
    82498
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Ejercicio\(\PageIndex{1}\)

    Escribe una línea de código que imprima la sentencia “El resultado es x voltios” donde x es el valor dado por la variable de punto flotante output_voltage.

    Ejercicio\(\PageIndex{2}\)

    Escribe una línea de código para definir una constante llamada RECIP2PI que sea igual a 1/ (2\(\pi\)).

    Ejercicio\(\PageIndex{3}\)

    Escriba el código para determinar el número de bytes requeridos para una variable llamada POWER_SUPPLY.

    Ejercicio\(\PageIndex{4}\)

    Supongamos que la variable X de 8 bits existe. Escribe el código para establecer el MSB (bit más significativo), dejando todos los demás bits sin cambios.

    Ejercicio\(\PageIndex{5}\)

    Supongamos que la variable de 8 bits Y existe. Escribe el código para establecer el LSB (bit menos significativo), dejando todos los demás bits sin cambios.

    Ejercicio\(\PageIndex{6}\)

    Supongamos que existe la variable Z de 8 bits. Escribe el código para borrar el MSB y LSB, dejando todos los demás bits sin cambios.

    Ejercicio\(\PageIndex{7}\)

    Supongamos que existe la variable W de 8 bits. Escribe el código para complementar cada bit (voltear 0 a 1 y 1 a 0).

    Ejercicio\(\PageIndex{8}\)

    Si X es 0x04 e Y es 0x09, cuáles son:

    a) X|Y

    b) X&Y

    c) ~X

    d) 0xF1&Y

    Ejercicio\(\PageIndex{9}\)

    Si X es 0xf0 e Y es 0x11, cuáles son:

    a) X|Y

    b) X&Y

    c) ~X

    d) 0xF1&Y


    This page titled 4.8: Ejercicios is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by James M. Fiore via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.