Answer:
Explanation:
(a) Given data:
Instruction pipeline with 4 phases.
80 instruction
The number of cycles if the processor were pipelined :
80-1 = (79) instruction takes only 1 extra cycle to complete.
So, cycles counts = 4 + (79) = 83 cycles.
The number of cycles if the processor were not pipelined.
Each instruction takes 4 cycles to complete.
So, cycle counts = 80 * 4 = 320 cycles.
(b) One of the main problems of conditional branching in pipelines is the delay it gives even after the branch target buffer.
In pipeline, conditional branches depend on the codes which are still in estimation.
(c) Two ways to deal with problem arising due to conditional branching are as follows :
1. Delayed Branching
2. Multiple Condition Codes
Answer:
A
Explanation:
Option A is not true because a Boolean variable type can hold one of two values only that is (true/True or false/False).
All the other options given in the question are correct because
- A variable declaration refers to specifying its type and name
- If string variables are assigned a numeric values which is legal provided the values are enclosed in quaotes( " "), trying to carryout a mathematical operation like addition will result in string concatenation.
- The Variable name I_Love_to_eat_pizza is legal because it contains no special characters, doesn't start with a number and its not a reserved word in any language
Answer:
Learn the basics of HTML.
Understand HTML document structure.
Get to know CSS selectors.
Put a CSS stylesheet together.
Get Bootstrap.
Pick a design.
Customize your website with HTML and CSS.
Add content and images.
Explanation:
Answer:
file1 = []
file2 = []
fileone = "lyric1.txt"
filetwo = "lyric2.txt"
def linereader( myfile, mylist):
for line in open(myfile, "r") as file:
line_read = readlines( line)
mylist.append( line_read)
file.close()
linereader( fileone, file1)
linereader( filetwo, file2)
# Assuming both files have same number of lines.
for index, item in enumerate(zip(file1, file2)):
if item[0] != item[1]:
print( index + 1, item)
Explanation:
The python code compares two files and returns the number and the lines from both files that do not match. The source code opens the files lyric1.txt and lyric2.txt reading each lines to different lists which are iterated to compare its items returning the number of the line and the unequal lines.
Answer:
C. Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.
Explanation:
Byte pair encoding is a form of encoding in which the most common pairs of consecutive bytes of data are replaced by a single byte which does not occur within the set of data.
For example, if we has a string ZZaaAb, it can be encoded if the pairs of string ZZ are replaced by X and the second pair by Y. So, our data now becomes XYAb.
To get our original data, that is decode it, we just replace the data with the keys X = ZZ and Y = aa thus allowing our original data to be restored.
Since our original string is restored without loss of data, it implies that <u>byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.</u>